/**Begin D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_PERMAPPLYASSIGN_L', 'T_HRCS_PERMAPPLYASSIGN_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PERMAPPLYASSIGN_L') CREATE INDEX IDX_HRCS_PERMAPPLYASSIGN_L ON T_HRCS_PERMAPPLYASSIGN_L ( FLOCALEID ,FENTRYID );


 EXEC P_ALTERPK 'PK_HRCS_PERMAPPLYCANCEL_L', 'T_HRCS_PERMAPPLYCANCEL_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PERMAPPLYCANCEL_L') CREATE INDEX IDX_HRCS_PERMAPPLYCANCEL_L ON T_HRCS_PERMAPPLYCANCEL_L ( FLOCALEID ,FENTRYID );


 EXEC P_ALTERPK 'PK_HRCS_PERMAPPLYCANCEL', 'T_HRCS_PERMAPPLYCANCEL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PERMAPPLYBILL', 'T_HRCS_PERMAPPLYBILL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PERMAPPLYBILL_FBILLNO') CREATE INDEX IDX_HRCS_PERMAPPLYBILL_FBILLNO ON T_HRCS_PERMAPPLYBILL ( FBILLNO );


 EXEC P_ALTERPK 'PK_HRCS_PERMAPPLYASSIGN', 'T_HRCS_PERMAPPLYASSIGN', 'FENTRYID', '1';

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



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