IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_HOLIDAYRANGE') 
 CREATE TABLE T_INT_HOLIDAYRANGE (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSTARTDATE DATETIME,
FENDDATE DATETIME,
FTEXT VARCHAR(50) DEFAULT ' ' NOT NULL
);

EXEC P_ALTERPK 'PK_T_INT_HOLIDAYRANGE', 'T_INT_HOLIDAYRANGE', 'FENTRYID', '1';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_INT_HOLIDAYRANGE_FID') CREATE INDEX IDX_T_INT_HOLIDAYRANGE_FID ON T_INT_HOLIDAYRANGE ( FID );

