IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILL' AND KSQL_COL_NAME ='FBASECURRENCYID') 
 ALTER TABLE T_FA_PURCHASEBILL ADD (FBASECURRENCYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILL' AND KSQL_COL_NAME ='FPURCHASECURRENCYID') 
 ALTER TABLE T_FA_PURCHASEBILL ADD (FPURCHASECURRENCYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILL' AND KSQL_COL_NAME ='FEXCHANGERATE') 
 ALTER TABLE T_FA_PURCHASEBILL ADD (FEXCHANGERATE DECIMAL(19,6) DEFAULT 1 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FTAXRATEID') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FTAXRATEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FNEWUNITPRICE') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FNEWUNITPRICE DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FORIGINTOTALAMOUNT') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FORIGINTOTALAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FORIGINUNITPRICE') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FORIGINUNITPRICE DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FORIGINNOTAXAMOUNT') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FORIGINNOTAXAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILLENTRY' AND KSQL_COL_NAME ='FORIGINTAXAMOUNT') 
 ALTER TABLE T_FA_PURCHASEBILLENTRY ADD (FORIGINTAXAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_PURCHASEBILL' AND KSQL_COL_NAME ='FEXCHANGERATETYPE') 
ALTER TABLE T_FA_PURCHASEBILL ADD (FEXCHANGERATETYPE CHAR(1) DEFAULT '0' NOT NULL );