 EXEC P_ALTERPK 'PK_TSRBD_MTDMAP', 'T_TSRBD_MTDMAP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TSRBD_MTDMAP_SOURCEKEY') CREATE INDEX IDX_TSRBD_MTDMAP_SOURCEKEY ON T_TSRBD_MTDMAP ( FSOURCEKEY );


 EXEC P_ALTERPK 'PK_TSRBD_MAPENTRY', 'T_TSRBD_MAPENTRY', 'FENTRYID', '1';

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