 
 
/*出差地域旺季区间*/ 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_TRIPAREADATEENTRY') 
 CREATE TABLE T_ER_TRIPAREADATEENTRY (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSTARTMONTH VARCHAR(50) DEFAULT '1' NOT NULL,
FSTARTDAY VARCHAR(50) DEFAULT '1' NOT NULL,
FENDMONTH VARCHAR(50) DEFAULT '1' NOT NULL,
FENDDAY VARCHAR(50) DEFAULT '1' NOT NULL
);
/*增加索引*/
 EXEC P_ALTERPK 'PK_T_ER_TRIPAREADATEENTRY', 'T_ER_TRIPAREADATEENTRY', 'FENTRYID', '0';

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