/** 手工新增文件： PDM还没有生成差量 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAL_BALANCELOG') 
 CREATE TABLE T_BAL_BALANCELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FOP VARCHAR(20) DEFAULT ' ' NOT NULL,
FTYPE CHAR(1) DEFAULT ' ' NOT NULL,
FRESULT CHAR(1) DEFAULT ' ' NOT NULL,
FSTART DATETIME,
FUSETIME INT DEFAULT 0 NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FBILLIDS NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BAL_BALANCELOGENTRY') 
 CREATE TABLE T_BAL_BALANCELOGENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FRULENO VARCHAR(30) DEFAULT ' ' NOT NULL,
FDBRUTE VARCHAR(10) DEFAULT ' ' NOT NULL,
FRULESTART DATETIME,
FRULEUSETIME INT DEFAULT 0 NOT NULL,
FRULERESULT CHAR(1) DEFAULT ' ' NOT NULL,
FRULEMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);

/**End 手工新增文件： PDM还没有生成差量 **/
