 EXEC P_ALTERPK 'PK_IM_MDC_PROBILLENTRY_LK', 'T_IM_MDC_PROBILLENTRY_LK', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_PROBILLENTRY_LK_FK') CREATE INDEX IDX_IM_MDC_PROBILLENTRY_LK_FK ON T_IM_MDC_PROBILLENTRY_LK ( FENTRYID );

 EXEC P_ALTERPK 'PK_IM_MDC_PROBILL_LK', 'T_IM_MDC_PROBILL_LK', 'FPKID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_PROBILL_LK_FK') CREATE INDEX IDX_IM_MDC_PROBILL_LK_FK ON T_IM_MDC_PROBILL_LK ( FID );

 EXEC P_ALTERPK 'PK_IM_MDC_PROBILL_TC', 'T_IM_MDC_PROBILL_TC', 'FID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_PROBILL_TC_TBILL') CREATE INDEX IDX_IM_MDC_PROBILL_TC_TBILL ON T_IM_MDC_PROBILL_TC ( FTBILLID );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_PROBILL_TC_TID') CREATE INDEX IDX_IM_MDC_PROBILL_TC_TID ON T_IM_MDC_PROBILL_TC ( FTID );
 
 EXEC P_ALTERPK 'PK_IM_MDC_PROBILL_WB', 'T_IM_MDC_PROBILL_WB', 'FENTRYID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_IM_MDC_PROBILL_WB_FK') CREATE INDEX IDX_IM_MDC_PROBILL_WB_FK ON T_IM_MDC_PROBILL_WB ( FID );
