/**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_CATEGORYCHG' AND KSQL_COL_NAME ='FINITIATOR') 
 ALTER TABLE T_PUR_CATEGORYCHG ADD (FINITIATOR CHAR(1) DEFAULT '0' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INVOICENTRY2_A' AND KSQL_COL_NAME ='FECORDER') 
 ALTER TABLE T_PUR_INVOICENTRY2_A ADD (FECORDER VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_REQUESTENTRY' AND KSQL_COL_NAME ='FLOTNUMBER') 
 ALTER TABLE T_PUR_REQUESTENTRY ADD (FLOTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INSTOCKENTRY' AND KSQL_COL_NAME ='FLOTNUMBER') 
 ALTER TABLE T_PUR_INSTOCKENTRY ADD (FLOTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_RECEIPTENTRY' AND KSQL_COL_NAME ='FLOTNUMBER') 
 ALTER TABLE T_PUR_RECEIPTENTRY ADD (FLOTNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL );

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