 EXEC P_ALTERPK 'PK_T_POM_NRCCDEFECTSITE', 'T_POM_NRCCDEFECTSITE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_NRCCDEFECTSITE_FK') CREATE INDEX IDX_POM_NRCCDEFECTSITE_FK ON T_POM_NRCCDEFECTSITE ( FID );
 
  EXEC P_ALTERPK 'PK_T_POM_CDEFECTREASON', 'T_POM_CDEFECTREASON', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_CDEFECTREASON_FK') CREATE INDEX IDX_POM_CDEFECTREASON_FK ON T_POM_CDEFECTREASON ( FID );
 
   EXEC P_ALTERPK 'PK_T_POM_DISPOSALHEAD', 'T_POM_DISPOSALHEAD', 'FPKID', '1';

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