/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT' AND KSQL_COL_NAME IN ('FISHIDESUPPLIER')) 
 ALTER TABLE T_SRC_PROJECT ADD (FISHIDESUPPLIER CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT' AND KSQL_COL_NAME IN ('FSCOREMETHOD')) 
 ALTER TABLE T_SRC_PROJECT ADD (FSCOREMETHOD CHAR(1) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_SCORE' AND KSQL_COL_NAME IN ('FSUPPLIERCODE')) 
 ALTER TABLE T_SRC_SCORE ADD (FSUPPLIERCODE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PURLISTENTRY' AND KSQL_COL_NAME IN ('FPRERESULT')) 
 ALTER TABLE T_SRC_PURLISTENTRY ADD (FPRERESULT CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PURLISTENTRY' AND KSQL_COL_NAME IN ('FSUPPLIERCODE')) 
 ALTER TABLE T_SRC_PURLISTENTRY ADD (FSUPPLIERCODE CHAR(50) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_BIDDOCENTRY' AND KSQL_COL_NAME IN ('FSUPPLIERCODE')) 
 ALTER TABLE T_SRC_BIDDOCENTRY ADD (FSUPPLIERCODE NVARCHAR(50) DEFAULT ' ' NOT NULL );
 
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FSUPPLIERCODE')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FSUPPLIERCODE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER_TEMP' AND KSQL_COL_NAME IN ('FSUPPLIERCODE')) 
 ALTER TABLE T_SRC_INVITESUPPLIER_TEMP ADD (FSUPPLIERCODE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_SCHEME' AND KSQL_COL_NAME IN ('FSCHEMESCORE')) 
 ALTER TABLE T_SRC_SCHEME ADD (FSCHEMESCORE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_SCHEMEINDEX' AND KSQL_COL_NAME IN ('FSCHEMESCORE')) 
 ALTER TABLE T_SRC_SCHEMEINDEX ADD (FSCHEMESCORE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_CONTRACTENTRY_A' AND KSQL_COL_NAME IN ('FPRERESULT')) 
 ALTER TABLE T_SRC_CONTRACTENTRY_A ADD (FPRERESULT CHAR(1) DEFAULT ' ' NOT NULL );



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