/**Begin C:\PDM_UPGRADE\PDM1\SRC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FMAXAMOUNT')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FMAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FMAXTAXAMOUNT')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FMAXTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FPKGRANK')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FPKGRANK INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FPKGAMOUNT')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FPKGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FPKGTAXAMOUNT')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FPKGTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FPRORANK')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FPRORANK INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FPROAMOUNT')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FPROAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_VIE_DETAIL' AND KSQL_COL_NAME IN ('FPROTAXAMOUNT')) 
 ALTER TABLE T_SRC_VIE_DETAIL ADD (FPROTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PROJECT_O' AND KSQL_COL_NAME IN ('FSUMTYPE')) 
 ALTER TABLE T_SRC_PROJECT_O ADD (FSUMTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PURLISTENTRY_F' AND KSQL_COL_NAME IN ('FMAXAMOUNT')) 
 ALTER TABLE T_SRC_PURLISTENTRY_F ADD (FMAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRC_PURLISTENTRY_F' AND KSQL_COL_NAME IN ('FMAXTAXAMOUNT')) 
 ALTER TABLE T_SRC_PURLISTENTRY_F ADD (FMAXTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

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