/**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 ('FSUPOPENTYPE')) 
 ALTER TABLE T_SRC_PROJECT ADD (FSUPOPENTYPE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT' AND KSQL_COL_NAME IN ('FISAPTITUDE')) 
 ALTER TABLE T_SRC_PROJECT ADD (FISAPTITUDE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_SCOREDETAIL' AND KSQL_COL_NAME IN ('FSUPPLIERNAME')) 
 ALTER TABLE T_SRC_SCOREDETAIL ADD (FSUPPLIERNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_COMPARESUM' AND KSQL_COL_NAME IN ('FSUPPLIERIP')) 
 ALTER TABLE T_SRC_COMPARESUM ADD (FSUPPLIERIP NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_COMPARESUM' AND KSQL_COL_NAME IN ('FSUPPLIERCODE')) 
 ALTER TABLE T_SRC_COMPARESUM ADD (FSUPPLIERCODE NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONSUMSUP' AND KSQL_COL_NAME IN ('FLOCAMOUNT')) 
 ALTER TABLE T_SRC_DECISIONSUMSUP ADD (FLOCAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONSUMSUP' AND KSQL_COL_NAME IN ('FLOCTAXAMOUNT')) 
 ALTER TABLE T_SRC_DECISIONSUMSUP ADD (FLOCTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_DECISIONWIN' AND KSQL_COL_NAME IN ('FISALLSUPPLIER')) 
 ALTER TABLE T_SRC_DECISIONWIN ADD (FISALLSUPPLIER CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FRANK')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FRANK INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FISTECOPEN')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FISTECOPEN CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FTECOPENDATE')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FTECOPENDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FTECOPENUSER')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FTECOPENUSER BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FISBIZOPEN')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FISBIZOPEN CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FBIZOPENDATE')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FBIZOPENDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FBIZOPENUSER')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FBIZOPENUSER BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FISAPTOPEN')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FISAPTOPEN CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FAPTOPENDATE')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FAPTOPENDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FAPTOPENUSER')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FAPTOPENUSER BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FISAPTPUSH')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FISAPTPUSH CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FISAPTPUSH2')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FISAPTPUSH2 CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FISBIDPUSH')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FISBIDPUSH CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_INVITESUPPLIER' AND KSQL_COL_NAME IN ('FSUPPLIERIP')) 
 ALTER TABLE T_SRC_INVITESUPPLIER ADD (FSUPPLIERIP CHAR(100) DEFAULT ' ' NOT NULL );

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