/**Begin D:\pdm\PDM_UPGRADE\PDM1\HRPTMC_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_CUSTOMSORT') 
 CREATE TABLE T_HRPTMC_CUSTOMSORT (
FID BIGINT DEFAULT 0 NOT NULL,
FRPTMANAGEID BIGINT DEFAULT 0 NOT NULL,
FRPTFIELDID BIGINT DEFAULT 0 NOT NULL,
FENTITYNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FENTITYFIELD VARCHAR(25) DEFAULT ' ' NOT NULL,
FFIELDTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FVALUETYPE VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_CUSTOMSORTETY') 
 CREATE TABLE T_HRPTMC_CUSTOMSORTETY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FLONG BIGINT DEFAULT 0 NOT NULL,
FSTRING NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_COMMONSORT') 
 CREATE TABLE T_HRPTMC_COMMONSORT (
FID BIGINT DEFAULT 0 NOT NULL,
FENTITYNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FENTITYFIELD VARCHAR(25) DEFAULT ' ' NOT NULL,
FFIELDTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FVALUETYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRPTMC_COMMONSORTETY') 
 CREATE TABLE T_HRPTMC_COMMONSORTETY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FLONG BIGINT DEFAULT 0 NOT NULL,
FSTRING NVARCHAR(50) DEFAULT ' ' NOT NULL
);



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