/**Begin D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTSET', 'T_FCS_SUSPECTSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SUSPECT') CREATE INDEX IDX_T_FCS_SUSPECT ON T_FCS_SUSPECTSET ( FDESTENTITYID ,FCTRLTYPE );


 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTSET_L', 'T_FCS_SUSPECTSET_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SUSPECT_L') CREATE INDEX IDX_T_FCS_SUSPECT_L ON T_FCS_SUSPECTSET_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTSET_M', 'T_FCS_SUSPECTSET_M', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTBILL', 'T_FCS_SUSPECTBILL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FCS_SUSBECTBILL') CREATE INDEX IDX_FCS_SUSBECTBILL ON T_FCS_SUSPECTBILL ( FCONFIRM ,FBILLID );


 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTBILL_L', 'T_FCS_SUSPECTBILL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTBILL_S', 'T_FCS_SUSPECTBILL_S', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FCS_SUSPECTBILL_S_L', 'T_FCS_SUSPECTBILL_S_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FCS_SUSPECTBILL_S_L') CREATE INDEX IDX_FCS_SUSPECTBILL_S_L ON T_FCS_SUSPECTBILL_S_L ( FENTRYID );



/**End D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
