/**Begin C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INDEXCLASS' AND KSQL_COL_NAME IN ('FLOWESTSCORE')) 
 ALTER TABLE T_PUR_INDEXCLASS ADD (FLOWESTSCORE CHAR(1) DEFAULT '1' NOT NULL );
 
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCORE' AND KSQL_COL_NAME IN ('FMATERIALID')) 
 ALTER TABLE T_PUR_SCORE ADD (FMATERIALID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_EVAPLAN' AND KSQL_COL_NAME IN ('FEVAMETHOD')) 
 ALTER TABLE T_PUR_EVAPLAN ADD (FEVAMETHOD CHAR(1) DEFAULT 'A' NOT NULL );



IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INDEX' AND KSQL_COL_NAME IN ('FFORMULAID')) 
 ALTER TABLE T_PUR_INDEX ADD (FFORMULAID BIGINT DEFAULT 0 NOT NULL );

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