/**Begin D:\PDM_UPGRADE\PDM1\HRCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEDIMROW') 
 CREATE TABLE T_HRCS_PINITROLEDIMROW (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FROLENUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FBUCAFUNCID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEFUNCCOL') 
 CREATE TABLE T_HRCS_PINITROLEFUNCCOL (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FROLENUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEFUNCCOL_L') 
 CREATE TABLE T_HRCS_PINITROLEFUNCCOL_L (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEFUNCROW') 
 CREATE TABLE T_HRCS_PINITROLEFUNCROW (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(18) DEFAULT ' ' NOT NULL,
FENTITYTYPEID VARCHAR(36) DEFAULT ' ' NOT NULL,
FPERMITEMID VARCHAR(18) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEDATAROW_L') 
 CREATE TABLE T_HRCS_PINITROLEDATAROW_L (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEDATAROW') 
 CREATE TABLE T_HRCS_PINITROLEDATAROW (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FROLENUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FBUCAFUNCID BIGINT DEFAULT 0 NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEFUNCROW_L') 
 CREATE TABLE T_HRCS_PINITROLEFUNCROW_L (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PINITROLEDIMROW_L') 
 CREATE TABLE T_HRCS_PINITROLEDIMROW_L (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FERRORMSG NVARCHAR(2000) DEFAULT ' ' NOT NULL
);



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