

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNCALFIELD')
 CREATE TABLE T_HRCS_WARNCALFIELD (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(300) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FVALUETYPE VARCHAR(20) DEFAULT ' ' NOT NULL,
FCONTROLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL,
FEXPR NCLOB DEFAULT ' ',
FVIEWEXPR NCLOB DEFAULT ' ',
FSOURCE VARCHAR(50) DEFAULT ' ' NOT NULL,
FORDER INT DEFAULT 0 NOT NULL,
FISSELECTED CHAR(1) DEFAULT '0' NOT NULL,
FCALMETHOD VARCHAR(10) DEFAULT ' ' NOT NULL,
FHIDEFIELD CHAR(1) DEFAULT '0' NOT NULL,
FSOURCEID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FINDEX INT DEFAULT 0 NOT NULL
);


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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_WARNCALREFFIELD')
 CREATE TABLE T_HRCS_WARNCALREFFIELD (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FREFTYPE VARCHAR(20) DEFAULT ' ' NOT NULL,
FREFFIELDALIAS VARCHAR(300) DEFAULT ' ' NOT NULL,
FREFCALFIELDID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL
);