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

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


 EXEC P_ALTERPK 'PK_T_CAS_PAYCHGBILL', 'T_CAS_PAYCHGBILL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_CAS_AGENTPAYBILL_E', 'T_CAS_AGENTPAYBILL_E', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_AGENTPAYBILL_E') CREATE INDEX IDX_CAS_AGENTPAYBILL_E ON T_CAS_AGENTPAYBILL_E ( FONLINEBANKACCTID );



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