/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_CAS_AGENTPAYBILLENTRY_E', 'T_CAS_AGENTPAYBILLENTRY_E', 'FENTRYID', '1';

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



 EXEC P_ALTERPK 'PK_T_CAS_RECPAYRULE_E', 'T_CAS_RECPAYRULE_E', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECPAYRULE_E') CREATE  CLUSTERED INDEX IDX_CAS_RECPAYRULE_E ON T_CAS_RECPAYRULE_E ( FRULESNAME );


 EXEC P_ALTERPK 'PK_T_CAS_RECPAYRULE_L', 'T_CAS_RECPAYRULE_L', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_CAS_RECPAYRULE_L') CREATE  CLUSTERED INDEX IDX_T_CAS_RECPAYRULE_L ON T_CAS_RECPAYRULE_L ( FNAME );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
