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

 EXEC p_AlterColumn 'T_PUR_EVAPLANENTRY', 'FBIZBILLTYPEID', 'VARCHAR(80)', 'NOT NULL', '1111', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCOREDETAIL' AND KSQL_COL_NAME IN ('FACCORDANCE')) 
 ALTER TABLE T_PUR_SCOREDETAIL ADD (FACCORDANCE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCORE' AND KSQL_COL_NAME IN ('FBIZBILLTYPEID')) 
 ALTER TABLE T_PUR_SCORE ADD (FBIZBILLTYPEID VARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_SCORE' AND KSQL_COL_NAME IN ('FBIZBILLNO')) 
 ALTER TABLE T_PUR_SCORE ADD (FBIZBILLNO VARCHAR(80) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRM_GROUPEVAPLAN' AND KSQL_COL_NAME IN ('FAVGCAL')) 
 ALTER TABLE T_SRM_GROUPEVAPLAN ADD (FAVGCAL CHAR(1) DEFAULT '1' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRM_GROUPEVAPLAN' AND KSQL_COL_NAME IN ('FTERMINATECALTYPE')) 
 ALTER TABLE T_SRM_GROUPEVAPLAN ADD (FTERMINATECALTYPE CHAR(1) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRM_GROUPSCORERPT' AND KSQL_COL_NAME IN ('FAVGCAL')) 
 ALTER TABLE T_SRM_GROUPSCORERPT ADD (FAVGCAL CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRM_GROUPSCORERPT' AND KSQL_COL_NAME IN ('FTERMINATECALTYPE')) 
 ALTER TABLE T_SRM_GROUPSCORERPT ADD (FTERMINATECALTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SRM_GROUPSCORERPTENTRY' AND KSQL_COL_NAME IN ('FORGWEIGHT')) 
 ALTER TABLE T_SRM_GROUPSCORERPTENTRY ADD (FORGWEIGHT DECIMAL(23,10) DEFAULT 0 NOT NULL );

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