/**Begin D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_BANKJOURNAL_E') 
 CREATE TABLE T_CAS_BANKJOURNAL_E (
FID BIGINT DEFAULT 0 NOT NULL,
FISLARGEAMOUNT CHAR(1) DEFAULT '0' NOT NULL,
FISSENSITIVE CHAR(1) DEFAULT '0' NOT NULL,
FISATTENTION CHAR(1) DEFAULT '0' NOT NULL,
FISDOUBT CHAR(1) DEFAULT '0' NOT NULL,
FRECPAYTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FRECPAYTYPEID BIGINT DEFAULT 0 NOT NULL,
FRECPAYERTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FRECPAYER BIGINT DEFAULT 0 NOT NULL,
FISINTERNAL CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_ACCOUNTBALANCE') 
 CREATE TABLE T_CAS_ACCOUNTBALANCE (
FID BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FBANKACCOUNTID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FDAYTRADENUM INT DEFAULT 0 NOT NULL,
FDAYTRADEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FCREDITAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDEBITAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDAYBALANCE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBOOKDATE DATETIME
);



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