/**Begin D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_BANKSTAIMPSCHE') 
 CREATE TABLE T_CAS_BANKSTAIMPSCHE (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FBANKID BIGINT DEFAULT 0 NOT NULL,
FDESC NVARCHAR(100) DEFAULT ' ' NOT NULL,
FLOCATIONINFILE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FUNIQUEFILED NVARCHAR(500) DEFAULT ' ' NOT NULL,
FISPRESET CHAR(1) DEFAULT '0' NOT NULL
);


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_BANKSTAIMPSCHE_E') 
 CREATE TABLE T_CAS_BANKSTAIMPSCHE_E (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FCOLUMNNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FMUSTRECORD CHAR(1) DEFAULT '0' NOT NULL,
FBILLFIELD NVARCHAR(100) DEFAULT ' ' NOT NULL,
FBILLFIELDNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FFIELDRULE BIGINT DEFAULT 0 NOT NULL,
FDESCRIPTION NVARCHAR(500) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_BANKSTAIMPSCHE_E_L') 
 CREATE TABLE T_CAS_BANKSTAIMPSCHE_E_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FBILLFIELDNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_BANKSTAFIELDRULE') 
 CREATE TABLE T_CAS_BANKSTAFIELDRULE (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(30) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FEXTENDFIELD NVARCHAR(500) DEFAULT ' ' NOT NULL
);


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



/**End D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
