/**Begin D:\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_DIMMAP') 
 CREATE TABLE T_HRPTMC_DIMMAP (
FID BIGINT DEFAULT 0 NOT NULL,
FREPORTID BIGINT DEFAULT 0 NOT NULL,
FPREINDEXID BIGINT DEFAULT 0 NOT NULL,
FPREINDEXNUMBER VARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_DIMMAPENTRY') 
 CREATE TABLE T_HRPTMC_DIMMAPENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FDIMNUMBER VARCHAR(300) DEFAULT ' ' NOT NULL,
FDIM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDIMTYPE VARCHAR(60) DEFAULT ' ' NOT NULL,
FDIMFROM VARCHAR(2) DEFAULT ' ' NOT NULL,
FDIMREALFROM VARCHAR(2) DEFAULT ' ' NOT NULL,
FPARAMRULE VARCHAR(2) DEFAULT ' ' NOT NULL,
FPREINDEXPARAM VARCHAR(300) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_REPORTPREINDEX') 
 CREATE TABLE T_HRPTMC_REPORTPREINDEX (
FID BIGINT DEFAULT 0 NOT NULL,
FREPORTID BIGINT DEFAULT 0 NOT NULL,
FPREINDEXID BIGINT DEFAULT 0 NOT NULL
);



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