
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CPS_SHORT_DETAIL' AND KSQL_COL_NAME ='FSUPPLIERID')
 ALTER TABLE T_MRP_CPS_SHORT_DETAIL ADD (FSUPPLIERID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CPS_DETAILENTRY' AND KSQL_COL_NAME ='FSUPPLIERID')
 ALTER TABLE T_MRP_CPS_DETAILENTRY ADD (FSUPPLIERID BIGINT DEFAULT 0 NOT NULL );
 

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CPS_SHORT_DETAIL' AND KSQL_COL_NAME ='FREPLACEPLANID')
 ALTER TABLE T_MRP_CPS_SHORT_DETAIL ADD (FREPLACEPLANID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CPS_DETAILENTRY' AND KSQL_COL_NAME ='FREPLACEPLANID')
 ALTER TABLE T_MRP_CPS_DETAILENTRY ADD (FREPLACEPLANID BIGINT DEFAULT 0 NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CPS_SHORT_DETAIL' AND KSQL_COL_NAME ='FISREPLACE')
 ALTER TABLE T_MRP_CPS_SHORT_DETAIL ADD (FISREPLACE CHAR(1) DEFAULT '0' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CPS_DETAILENTRY' AND KSQL_COL_NAME ='FISREPLACE')
 ALTER TABLE T_MRP_CPS_DETAILENTRY ADD (FISREPLACE CHAR(1) DEFAULT '0' NOT NULL );