/**Begin C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCORE' AND KSQL_COL_NAME IN ('FDATETIMEFROM')) 
 ALTER TABLE T_PUR_SCORE ADD (FDATETIMEFROM DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCORE' AND KSQL_COL_NAME IN ('FDATETIMETO')) 
 ALTER TABLE T_PUR_SCORE ADD (FDATETIMETO DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCHEME' AND KSQL_COL_NAME IN ('FSYNSUPGRADE')) 
 ALTER TABLE T_PUR_SCHEME ADD (FSYNSUPGRADE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EVAPLAN' AND KSQL_COL_NAME IN ('FDATETIMEFROM')) 
 ALTER TABLE T_PUR_EVAPLAN ADD (FDATETIMEFROM DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EVAPLAN' AND KSQL_COL_NAME IN ('FDATETIMETO')) 
 ALTER TABLE T_PUR_EVAPLAN ADD (FDATETIMETO DATETIME );

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