IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FCOPTYPE') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FCOPTYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FMANUSTRATEGY') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FMANUSTRATEGY BIGINT DEFAULT 0 NOT NULL ); 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FONWORKQTY4REQ') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FONWORKQTY4REQ DECIMAL(23,10) DEFAULT 0 NOT NULL ); 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FRECEIVEQTY4REQ') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FRECEIVEQTY4REQ DECIMAL(23,10) DEFAULT 0 NOT NULL ); 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FONWORKQTY4SUP') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FONWORKQTY4SUP DECIMAL(23,10) DEFAULT 0 NOT NULL ); 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FRECEIVEQTY4SUP') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FRECEIVEQTY4SUP DECIMAL(23,10) DEFAULT 0 NOT NULL ); 