EXEC P_ALTERPK 'PK_T_CAD_COSTTYPEENTRY', 'T_CAD_COSTTYPEENTRY', 'FENTRYID', '1';

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