/**Begin D:\PDM_UPGRADE\PDM1\EB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_OFFSETENTRY') 
 CREATE TABLE T_EB_OFFSETENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(60) DEFAULT ' ' NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FVERSIONID BIGINT DEFAULT 0 NOT NULL,
FDATATYPEID BIGINT DEFAULT 0 NOT NULL,
FCSLORGID BIGINT DEFAULT 0 NOT NULL,
FYEARID BIGINT DEFAULT 0 NOT NULL,
FPERIODID BIGINT DEFAULT 0 NOT NULL,
FAUDITTRAILID BIGINT DEFAULT 0 NOT NULL,
FCHANGETYPEID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FMETRICID BIGINT DEFAULT 0 NOT NULL,
FSELFDIM1 BIGINT DEFAULT 0 NOT NULL,
FSELFDIM2 BIGINT DEFAULT 0 NOT NULL,
FSELFDIM3 BIGINT DEFAULT 0 NOT NULL,
FSELFDIM4 BIGINT DEFAULT 0 NOT NULL,
FSELFDIM5 BIGINT DEFAULT 0 NOT NULL,
FSELFDIM6 BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FOFFSETRULELD BIGINT DEFAULT 0 NOT NULL,
FSCENARIOID BIGINT DEFAULT 0 NOT NULL,
FPROCESSID BIGINT DEFAULT 0 NOT NULL,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FOFFSETORGID BIGINT DEFAULT 0 NOT NULL,
FOFFSETCATALOG NVARCHAR(60) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_OFFSETENTRYDETAIL') 
 CREATE TABLE T_EB_OFFSETENTRYDETAIL (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FMYORGID BIGINT DEFAULT 0 NOT NULL,
FINTERORGID BIGINT DEFAULT 0 NOT NULL,
FACCOUNTID BIGINT DEFAULT 0 NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNTD DECIMAL(23,10) DEFAULT 0 NOT NULL,
FAMOUNTC DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSOURCE CHAR(1) DEFAULT ' ' NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_OFFSETEXECUTELOG') 
 CREATE TABLE T_EB_OFFSETEXECUTELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FPARAMETERDATA NCLOB,
FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FMSG NVARCHAR(1000) DEFAULT ' ' NOT NULL
);



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