/**Begin D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_table.sql **/
 EXEC p_AlterColumn 'T_SIM_ORIGINAL_BILL', 'FTEXTFIELD1', 'VARCHAR(150)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_SIM_ORIGINAL_BILL', 'FTEXTFIELD2', 'VARCHAR(150)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_SIM_ORIGINAL_BILL', 'FTEXTFIELD3', 'VARCHAR(150)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FEXTRAFIELD2') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FEXTRAFIELD2 VARCHAR(150) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FEXTRAFIELD3') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FEXTRAFIELD3 VARCHAR(150) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FEXTRAFIELD4') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FEXTRAFIELD4 VARCHAR(150) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FEXTRAFIELD5') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FEXTRAFIELD5 VARCHAR(150) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_E' AND KSQL_COL_NAME ='FTEXTFIELD4') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_E ADD (FTEXTFIELD4 VARCHAR(150) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_E' AND KSQL_COL_NAME ='FTEXTFIELD5') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_E ADD (FTEXTFIELD5 VARCHAR(150) DEFAULT ' ' NOT NULL );

/**End D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_table.sql **/
