/**Begin D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_INFO' AND KSQL_COL_NAME ='FPAYEE') 
 ALTER TABLE T_SIM_RED_INFO ADD (FPAYEE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_INFO' AND KSQL_COL_NAME ='FJQBH') 
 ALTER TABLE T_SIM_RED_INFO ADD (FJQBH NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_INFO' AND KSQL_COL_NAME ='FREVIEWER') 
 ALTER TABLE T_SIM_RED_INFO ADD (FREVIEWER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_INFO' AND KSQL_COL_NAME ='FINVOICECODE') 
 ALTER TABLE T_SIM_RED_INFO ADD (FINVOICECODE NVARCHAR(20) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_INFO' AND KSQL_COL_NAME ='FINVOICENO') 
 ALTER TABLE T_SIM_RED_INFO ADD (FINVOICENO NVARCHAR(15) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_INFO' AND KSQL_COL_NAME ='FINFOSERIALNO') 
 ALTER TABLE T_SIM_RED_INFO ADD (FINFOSERIALNO NVARCHAR(30) DEFAULT ' ' NOT NULL );

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