/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_ALGOREGISTER' AND KSQL_COL_NAME ='FVERSION') 
 ALTER TABLE T_MRP_ALGOREGISTER ADD (FVERSION NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_BUSINESSPLAN' AND KSQL_COL_NAME ='FVERSION') 
 ALTER TABLE T_MRP_BUSINESSPLAN ADD (FVERSION NVARCHAR(30) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_RSREGISTER' AND KSQL_COL_NAME ='FVERSION') 
 ALTER TABLE T_MRP_RSREGISTER ADD (FVERSION NVARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_BFTRANSFER' AND KSQL_COL_NAME ='FVERSION') 
 ALTER TABLE T_MRP_BFTRANSFER ADD (FVERSION NVARCHAR(30) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALPLANCONFIG' AND KSQL_COL_NAME ='FVERSION')
 ALTER TABLE T_MRP_CALPLANCONFIG ADD (FVERSION NVARCHAR(30) DEFAULT ' ' NOT NULL );

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