/**Begin D:\PDM_UPGRADE\PDM1\MRP_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FSUPPLYPROJECT') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FSUPPLYPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY' AND KSQL_COL_NAME ='FDEMANDPROJECT') 
 ALTER TABLE T_MRP_CALDETAILENTRY ADD (FDEMANDPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PEGINFODATAENTRY' AND KSQL_COL_NAME ='FDEMANDPROJECT')
 ALTER TABLE T_MRP_PEGINFODATAENTRY ADD (FDEMANDPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PEGINFODATAENTRY' AND KSQL_COL_NAME ='FSUPPLYPROJECT')
 ALTER TABLE T_MRP_PEGINFODATAENTRY ADD (FSUPPLYPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANORDER' AND KSQL_COL_NAME ='FPROJECT')
 ALTER TABLE T_MRP_PLANORDER ADD (FPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_SIMULATEORDER' AND KSQL_COL_NAME ='FPROJECT') 
 ALTER TABLE T_MRP_SIMULATEORDER ADD (FPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_SIMULATIONCALCENTRY' AND KSQL_COL_NAME ='FSUPPLYPROJECT') 
 ALTER TABLE T_MRP_SIMULATIONCALCENTRY ADD (FSUPPLYPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_SIMULATIONCALCENTRY' AND KSQL_COL_NAME ='FDEMANDPROJECT') 
 ALTER TABLE T_MRP_SIMULATIONCALCENTRY ADD (FDEMANDPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_XPLANORDER' AND KSQL_COL_NAME ='FPROJECT') 
 ALTER TABLE T_MRP_XPLANORDER ADD (FPROJECT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_ADJUSTSUGGEST' AND KSQL_COL_NAME ='FPROJECT')
 ALTER TABLE T_MRP_ADJUSTSUGGEST ADD (FPROJECT BIGINT DEFAULT 0 NOT NULL );

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