/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY_S' AND KSQL_COL_NAME ='FSOURCEBILLID') 
 ALTER TABLE T_POM_XMFTORDERENTRY_S ADD (FSOURCEBILLID 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 ='FSOURCEBILLID') 
 ALTER TABLE T_POM_MFTORDERENTRY_S ADD (FSOURCEBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FMATERIALSPREAD') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FMATERIALSPREAD CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY' AND KSQL_COL_NAME ='FMATERIALSPREAD') 
 ALTER TABLE T_POM_XMFTORDERENTRY ADD (FMATERIALSPREAD CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MANUSTOCKENTRY' AND KSQL_COL_NAME ='FSRCBILLID') 
 ALTER TABLE T_POM_MANUSTOCKENTRY ADD (FSRCBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MANUSTOCKENTRY' AND KSQL_COL_NAME ='FSRCBILLENTRYID') 
 ALTER TABLE T_POM_MANUSTOCKENTRY ADD (FSRCBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMANUSTOCKENTRY' AND KSQL_COL_NAME ='FSRCBILLID') 
 ALTER TABLE T_POM_XMANUSTOCKENTRY ADD (FSRCBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMANUSTOCKENTRY' AND KSQL_COL_NAME ='FSRCBILLENTRYID') 
 ALTER TABLE T_POM_XMANUSTOCKENTRY ADD (FSRCBILLENTRYID BIGINT DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/
