/**Begin D:\pdm\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_ROWALGORITHM') 
 CREATE TABLE T_HRPTMC_ROWALGORITHM (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBERALIAS NVARCHAR(300) DEFAULT ' ' NOT NULL,
FALGORITHM VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_ALGORITHMCOL') 
 CREATE TABLE T_HRPTMC_ALGORITHMCOL (
FID BIGINT DEFAULT 0 NOT NULL,
FSHOWLOCATION VARCHAR(10) DEFAULT ' ' NOT NULL,
FTOTAL CHAR(1) DEFAULT '0' NOT NULL,
FTOTALNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSUBTOTAL CHAR(1) DEFAULT '0' NOT NULL,
FSUBTOTALNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDIMFIELD NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FRPTCONFIGID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_COLALGORITHMTYPE') 
 CREATE TABLE T_HRPTMC_COLALGORITHMTYPE (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBERALIAS NVARCHAR(300) DEFAULT ' ' NOT NULL,
FALGORITHM VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_ALGORITHMCOL_L') 
 CREATE TABLE T_HRPTMC_ALGORITHMCOL_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FTOTALNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FSUBTOTALNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);



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