/**Begin D:\pdm\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/

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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_RPTDISPSCMROW') 
 CREATE TABLE T_HRPTMC_RPTDISPSCMROW (
FID BIGINT DEFAULT 0 NOT NULL,
FBIZINDEX INT DEFAULT 0 NOT NULL,
FRPTDISPSCMID BIGINT DEFAULT 0 NOT NULL,
FROWFIELDID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_RPTDISPSCMCOL') 
 CREATE TABLE T_HRPTMC_RPTDISPSCMCOL (
FID BIGINT DEFAULT 0 NOT NULL,
FBIZINDEX INT DEFAULT 0 NOT NULL,
FRPTDISPSCMID BIGINT DEFAULT 0 NOT NULL,
FCOLFIELDID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_RPTDISPSCMIDX') 
 CREATE TABLE T_HRPTMC_RPTDISPSCMIDX (
FID BIGINT DEFAULT 0 NOT NULL,
FBIZINDEX INT DEFAULT 0 NOT NULL,
FRPTDISPSCMID BIGINT DEFAULT 0 NOT NULL,
FROWFIELDID BIGINT DEFAULT 0 NOT NULL,
FENABLE CHAR(1) DEFAULT '0' NOT NULL
);

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