/**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_ORIGINAL_BILL' AND KSQL_COL_NAME ='FPUSHAMOUNT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FPUSHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FPUSHLOCALAMOUNT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FPUSHLOCALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FUNPUSHLOCALAMOUNT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FUNPUSHLOCALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL' AND KSQL_COL_NAME ='FUNPUSHAMOUNT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL ADD (FUNPUSHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FPUSHNUM') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FPUSHNUM DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FUNPUSHNUM') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FUNPUSHNUM DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FPUSHAMT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FPUSHAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FUNPUSHAMT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FUNPUSHAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FPUSHLOCALAMT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FPUSHLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FUNPUSHLOCALAMT') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FUNPUSHLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCOREBILLTYPE') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCOREBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCOREBILLNO') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCOREBILLNO VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCOREBILLID') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCOREBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCOREBILLENTRYSEQ') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCOREBILLENTRYSEQ BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCOREBILLENTRYID') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCONBILLENTITY') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCONBILLENTITY VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCONBILLNUMBER') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCONBILLNUMBER VARCHAR(300) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCONBILLROWNUM') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCONBILLROWNUM VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCONBILLID') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FCONBILLENTRYID') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_ITEM' AND KSQL_COL_NAME ='FDISCOUNTMODE') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_ITEM ADD (FDISCOUNTMODE VARCHAR(20) DEFAULT ' ' NOT NULL );

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