
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_TEMPACCOUNTENTRY') 
 CREATE TABLE T_BCM_TEMPACCOUNTENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FACCOUNTMEMBER BIGINT DEFAULT 0 NOT NULL,
FISOTHER CHAR(1) DEFAULT '0' NOT NULL,
FACCHANGETYPE BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_TEMPCHANGETYPEENTRY') 
 CREATE TABLE T_BCM_TEMPCHANGETYPEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCHCHANGETYPE BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_TEMPFLOATENTRY') 
 CREATE TABLE T_BCM_TEMPFLOATENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FFLOATDIMENSION BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_TEMPFORMULAENTRY') 
 CREATE TABLE T_BCM_TEMPFORMULAENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FCLCHANGETYPE BIGINT DEFAULT 0 NOT NULL,
FCLYEAR INT DEFAULT 0 NOT NULL,
FCLPERIOD INT DEFAULT 0 NOT NULL,
FFETCHTYPE VARCHAR(10) DEFAULT 'Y' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_TEMPSTYLESCHEME') 
 CREATE TABLE T_BCM_TEMPSTYLESCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'A' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FSCHEMETYPE CHAR(1) DEFAULT '1' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FFORMULATYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FACCOUNTBOOKSTYPE BIGINT DEFAULT 0 NOT NULL,
FCLCURRENCY BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_TEMPSTYLESCHEME_L') 
 CREATE TABLE T_BCM_TEMPSTYLESCHEME_L (
FPKID VARCHAR(30) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);

