/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IM_BAL_RECAL_LOG') 
 CREATE TABLE T_IM_BAL_RECAL_LOG (
FID BIGINT DEFAULT 0 NOT NULL,
FMSGID VARCHAR(50) DEFAULT ' ' NOT NULL,
FTASKNO VARCHAR(20) DEFAULT ' ' NOT NULL,
FSTART DATETIME,
FBILLNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FRULEID VARCHAR(30) DEFAULT ' ' NOT NULL,
FSTATUS CHAR(1) DEFAULT 'C' NOT NULL,
FSTARTID BIGINT DEFAULT 0 NOT NULL,
FTRUECOUNT INT DEFAULT 0 NOT NULL,
FMSGSTART DATETIME,
FMSGUSERTIME INT DEFAULT 0 NOT NULL,
FBILLFS VARCHAR(2000) DEFAULT ' ' NOT NULL,
FBILLFS_VIEW VARCHAR(2000) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IM_BAL_RECAL_POINT') 
 CREATE TABLE T_IM_BAL_RECAL_POINT (
FID BIGINT DEFAULT 0 NOT NULL,
FRULEID VARCHAR(30) DEFAULT ' ' NOT NULL,
FENDID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FSTATUS CHAR(1) DEFAULT 'B' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IM_INVBAL_OPLOG') 
 CREATE TABLE T_IM_INVBAL_OPLOG (
FID BIGINT DEFAULT 0 NOT NULL,
FOP VARCHAR(30) DEFAULT ' ' NOT NULL,
FOPDESC VARCHAR(30) DEFAULT ' ' NOT NULL,
FOPUSER BIGINT DEFAULT 0 NOT NULL,
FOPTIME DATETIME,
FPARAMS VARCHAR(2000) DEFAULT ' ' NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_table.sql **/
