/**Begin D:\PDM_UPGRADE\PDM1\POM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FBASEUNIT') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FBASEUNIT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FBASEQTY') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FAUXPTYUNIT') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FAUXPTYUNIT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FAUXPTYQTY') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FAUXPTYQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FMANFTECHSTATUS') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FMANFTECHSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY_S' AND KSQL_COL_NAME ='FBASEUNITID') 
 ALTER TABLE T_POM_MFTORDERENTRY_S ADD (FBASEUNITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY_S' AND KSQL_COL_NAME ='FBASEQTY') 
 ALTER TABLE T_POM_MFTORDERENTRY_S ADD (FBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY_S' AND KSQL_COL_NAME ='FBILLAUXQTY') 
 ALTER TABLE T_POM_MFTORDERENTRY_S ADD (FBILLAUXQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY_S' AND KSQL_COL_NAME ='FBILLAUXUNIT') 
 ALTER TABLE T_POM_MFTORDERENTRY_S ADD (FBILLAUXUNIT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MANUSTOCKENTRY' AND KSQL_COL_NAME ='FWASTAGERATEFORMULA') 
 ALTER TABLE T_POM_MANUSTOCKENTRY ADD (FWASTAGERATEFORMULA NVARCHAR(30) DEFAULT ' ' NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\POM_table.sql **/
