IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_MUL_SCHEME_SET') 
 CREATE TABLE T_BAS_MUL_SCHEME_SET (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMAINNUMBER VARCHAR(100) DEFAULT ' ' NOT NULL,
FENTITYNUMBER VARCHAR(100) DEFAULT ' ' NOT NULL,
FDETAILSHEET INT DEFAULT -1 NOT NULL,
FIMPORTTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FDATAREPLACENUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FDATAREPLACENAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTARTROW INT DEFAULT -1 NOT NULL,
FSTARTCOL INT DEFAULT -1 NOT NULL,
FLOWERCONCATEFIELD INT DEFAULT -1 NOT NULL,
FSUPERCONCATEFIELD INT DEFAULT -1 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_MULIMPORT_ENTITY') 
 CREATE TABLE T_BAS_MULIMPORT_ENTITY (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID VARCHAR(50) DEFAULT ' ' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_MUL_SCHEME_MAP') 
 CREATE TABLE T_BAS_MUL_SCHEME_MAP (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FENTITYFIELDNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FISMAPPING CHAR(1) DEFAULT '0' NOT NULL,
FENTITYFIELDNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXCELFIELD INT DEFAULT -1 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAS_MULIMPORT_SCHEME') 
 CREATE TABLE T_BAS_MULIMPORT_SCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(36) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'C' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FCREATETIME DATETIME DEFAULT GETDATE() NOT NULL,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FFIRSTIMPORTSHEET INT DEFAULT -1 NOT NULL,
FSCHEMEDESC NVARCHAR(200) DEFAULT ' ' NOT NULL,
FFILEPATH VARCHAR(500) DEFAULT ' ' NOT NULL,
FFILENAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FFILESIZE INT DEFAULT 0 NOT NULL
);