EXEC P_ALTERPK 'PK_MSPLAN_GTTCUSTOM', 'T_MSPLAN_GTTCUSTOM', 'FID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDXS_MSPLAN_GTTCUST_TK')  CREATE INDEX IDXS_MSPLAN_GTTCUST_TK ON T_MSPLAN_GTTCUSTOM ( FTASKENTITYID, FDATAID);

EXEC P_ALTERPK 'PK_MSPLAN_GTTCUSENTITY', 'T_MSPLAN_GTTCUSENTITY', 'FENTRYID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDXS_MSPLAN_GTTCUSTE_FID')  CREATE INDEX IDXS_MSPLAN_GTTCUSTE_FID ON T_MSPLAN_GTTCUSENTITY ( FID, FSEQ);

EXEC P_ALTERPK 'PK_MSPLAN_GTTCUSSUB', 'T_MSPLAN_GTTCUSSUB', 'FDETAILID', '1';
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDXS_MSPLAN_GTTCUSSB_FEEID')  CREATE INDEX IDXS_MSPLAN_GTTCUSSB_FEEID ON T_MSPLAN_GTTCUSSUB ( FENTRYID, FSEQ);