IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FSALERTAXNO') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FSALERTAXNO VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FSALERNAME') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FSALERNAME VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FSALERADDR') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FSALERADDR VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FINVOICEREMARK') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FINVOICEREMARK VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FTERMINALNO') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FTERMINALNO VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FSYSTEMSOURCE') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FSYSTEMSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FTEXTFIELD1') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FTEXTFIELD1 VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FTEXTFIELD2') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FTEXTFIELD2 VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FTEXTFIELD3') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FTEXTFIELD3 VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FTOTALTAX') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FTOTALTAX DECIMAL(23,10) DEFAULT 0 NOT NULL );