IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_EXRATE' AND KSQL_COL_NAME ='FCOMPUTATIONRULES')
 ALTER TABLE T_BD_EXRATE ADD (FCOMPUTATIONRULES VARCHAR(64) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_EXRATE_CROSS')
 CREATE TABLE T_BD_EXRATE_CROSS (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(32) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_EXRATE_CROSSENTRY')
 CREATE TABLE T_BD_EXRATE_CROSSENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FEXRATETABLE BIGINT DEFAULT 0 NOT NULL,
FORGCUR BIGINT DEFAULT 0 NOT NULL,
FTARGETCUR BIGINT DEFAULT 0 NOT NULL,
FOVERLAY CHAR(1) DEFAULT '0' NOT NULL
);
