/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BEI_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BEI_TRANSDETAIL', 'T_BEI_TRANSDETAIL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_TD_FORGID') CREATE  CLUSTERED INDEX IDX_BEI_TD_FORGID ON T_BEI_TRANSDETAIL ( FORGID ,FBANKACCOUNTID ,FBIZTYPE );


 EXEC P_ALTERPK 'PK_T_BEI_TRANSDETAIL_E', 'T_BEI_TRANSDETAIL_E', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BEI_TD_FORGIDE') CREATE  CLUSTERED INDEX IDX_BEI_TD_FORGIDE ON T_BEI_TRANSDETAIL_E ( FDATASOURCES ,FAGENTACCNO );


 EXEC P_ALTERPK 'PK_T_BEI_BANKBALANCE', 'T_BEI_BANKBALANCE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'BANLANCE') CREATE INDEX BANLANCE ON T_BEI_BANKBALANCE ( FBANKACCOUNTID ,FCURRENCYID ,FBIZDATE );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BEI_constraint.sql **/
