/**Begin D:\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_CONFIRM_BILL' AND KSQL_COL_NAME ='FLANDTAXNO') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FLANDTAXNO VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FSIMPLEADDRESS') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FSIMPLEADDRESS BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FDETAILADDRESS') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FDETAILADDRESS VARCHAR(180) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FSTARTLEASEDATE') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FSTARTLEASEDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FENDLEASEDATE') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FENDLEASEDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FBUILDINGNAME') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FBUILDINGNAME VARCHAR(120) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FCROSSCITYSIGN') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FCROSSCITYSIGN VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FESTATEID') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FESTATEID VARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FAREAUNIT') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FAREAUNIT VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_RED_CONFIRM_BILL' AND KSQL_COL_NAME ='FSPECIALTYPE') 
 ALTER TABLE T_SIM_RED_CONFIRM_BILL ADD (FSPECIALTYPE VARCHAR(30) DEFAULT '00' NOT NULL );

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