/**Begin D:\lc_guan\PDM_workspace\PDM_UPGRADE\PDM1\HRCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_EARLYWARN_LOG') 
 CREATE TABLE T_HRCS_EARLYWARN_LOG (
FID BIGINT DEFAULT 0 NOT NULL,
FWARNSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FWARNSCENEID BIGINT DEFAULT 0 NOT NULL,
FEXECTYPE VARCHAR(2) DEFAULT '0' NOT NULL,
FEXECSTATUS VARCHAR(2) DEFAULT '1' NOT NULL,
FSTARTTIME DATETIME,
FENDTIME DATETIME,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_EARLYWARNLOGENTRY') 
 CREATE TABLE T_HRCS_EARLYWARNLOGENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FEXECSTEP NVARCHAR(500) DEFAULT ' ' NOT NULL,
FENSTARTTIME DATETIME,
FRESULT NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FRESULT_TAG NCLOB
);


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



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