/**Begin C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SUPCATEGORY' AND KSQL_COL_NAME IN ('FEFFECTDATE')) 
 ALTER TABLE T_PUR_SUPCATEGORY ADD (FEFFECTDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SUPCATEGORY' AND KSQL_COL_NAME IN ('FEXPIRYDATE')) 
 ALTER TABLE T_PUR_SUPCATEGORY ADD (FEXPIRYDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_APPROVEENTRY' AND KSQL_COL_NAME IN ('FEXPIRYDATE')) 
 ALTER TABLE T_PUR_APPROVEENTRY ADD (FEXPIRYDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_APPROVEENTRY' AND KSQL_COL_NAME IN ('FEFFECTDATE')) 
 ALTER TABLE T_PUR_APPROVEENTRY ADD (FEFFECTDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CATEGORYCHGENTRY' AND KSQL_COL_NAME IN ('FEFFECTDATE')) 
 ALTER TABLE T_PUR_CATEGORYCHGENTRY ADD (FEFFECTDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CATEGORYCHGENTRY' AND KSQL_COL_NAME IN ('FEXPIRYDATE')) 
 ALTER TABLE T_PUR_CATEGORYCHGENTRY ADD (FEXPIRYDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_CATEGORYCHGENTRY' AND KSQL_COL_NAME IN ('FSUPCATEGORYID')) 
 ALTER TABLE T_PUR_CATEGORYCHGENTRY ADD (FSUPCATEGORYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_APTITUDEENTRY' AND KSQL_COL_NAME IN ('FEFFECTDATE')) 
 ALTER TABLE T_PUR_APTITUDEENTRY ADD (FEFFECTDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_APTITUDEENTRY' AND KSQL_COL_NAME IN ('FEXPIRYDATE')) 
 ALTER TABLE T_PUR_APTITUDEENTRY ADD (FEXPIRYDATE DATETIME );

/**End C:\PDM_UPGRADE\PDM1\SRM_table.sql **/
