IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_BILLFIELDMAP_E') 
 CREATE TABLE T_FA_BILLFIELDMAP_E (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FTARGETOBJCOLNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FTARGETOBJCOL VARCHAR(100) DEFAULT ' ' NOT NULL,
FSELECTTYPE CHAR(1) DEFAULT '0' NOT NULL,
FSOURCEBILLCOLNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FSOURCEBILLCOL VARCHAR(100) DEFAULT ' ' NOT NULL,
FFORMULADESC VARCHAR(100) DEFAULT ' ' NOT NULL,
FFORMULA VARCHAR(50) DEFAULT ' ' NOT NULL,
FFORMULA_TAG NCLOB,
FFIXEDVALUE VARCHAR(50) DEFAULT ' ' NOT NULL,
FISENABLE CHAR(1) DEFAULT '0' NOT NULL,
FISSYSINIT CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_BILLFIELDMAP') 
 CREATE TABLE T_FA_BILLFIELDMAP (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(100) DEFAULT ' ' NOT NULL,
FTARGETOBJ VARCHAR(50) DEFAULT ' ' NOT NULL,
FSOURCEBILL VARCHAR(50) DEFAULT ' ' NOT NULL,
FBIZAPPID VARCHAR(50) DEFAULT ' ' NOT NULL,
FISENABLE CHAR(1) DEFAULT '0' NOT NULL,
FISSYSINIT CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_BILLFIELDMAP_L') 
 CREATE TABLE T_FA_BILLFIELDMAP_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(20) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(255) DEFAULT ' ' NOT NULL
);