 EXEC P_ALTERPK 'PK_PUR_CAL_CONDIENTITY', 'T_PUR_CAL_CONDIENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CALCONDIENTITY_FID_FSEQ') CREATE INDEX IDX_CALCONDIENTITY_FID_FSEQ ON T_PUR_CAL_CONDIENTITY ( FID ,FSEQ );