/**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_MSPLAN_INVDETAILENTRY' AND KSQL_COL_NAME ='FDEMANDBILLF7')
 ALTER TABLE T_MSPLAN_INVDETAILENTRY ADD (FDEMANDBILLF7 NVARCHAR(60) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVDETAILENTRY' AND KSQL_COL_NAME ='FSUPPLYBILLF7')
 ALTER TABLE T_MSPLAN_INVDETAILENTRY ADD (FSUPPLYBILLF7 NVARCHAR(60) DEFAULT ' ' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVDETAILENTRY' AND KSQL_COL_NAME ='FISHANDLE')
 ALTER TABLE T_MSPLAN_INVDETAILENTRY ADD (FISHANDLE CHAR(1) DEFAULT '0' NOT NULL );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_INVDETAILENTRY' AND KSQL_COL_NAME ='FBOMVERSION')
 ALTER TABLE T_MSPLAN_INVDETAILENTRY ADD (FBOMVERSION BIGINT DEFAULT 0 NOT NULL );

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