/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EXAMINE' AND KSQL_COL_NAME ='FCONFIRMSTATUS') 
 ALTER TABLE T_PUR_EXAMINE ADD (FCONFIRMSTATUS CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EXAMINE_L' AND KSQL_COL_NAME ='FSRCBILLNAME') 
 ALTER TABLE T_PUR_EXAMINE_L ADD (FSRCBILLNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EXAMINE_A' AND KSQL_COL_NAME ='FINVALIDID') 
 ALTER TABLE T_PUR_EXAMINE_A ADD (FINVALIDID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EXAMINE_A' AND KSQL_COL_NAME ='FINVALIDDATE') 
 ALTER TABLE T_PUR_EXAMINE_A ADD (FINVALIDDATE DATETIME );

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