/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BD_NETBANKACCT', 'T_BD_NETBANKACCT', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_NETBANKACCT_NUM') CREATE  CLUSTERED INDEX IDX_T_BD_NETBANKACCT_NUM ON T_BD_NETBANKACCT ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_BD_NETBANKACCT_L', 'T_BD_NETBANKACCT_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_T_BD_NETBANKACCT_R3', 'T_BD_NETBANKACCT_R3', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_NETBANKACCT_R3_NUM') CREATE  CLUSTERED INDEX IDX_T_BD_NETBANKACCT_R3_NUM ON T_BD_NETBANKACCT_R3 ( FREFSTATUS );


 EXEC P_ALTERPK 'PK_BD_ACCOUNTBANKS_NB', 'T_BD_ACCOUNTBANKS_NB', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_ACCOUNTBANKS_NB_FK') CREATE  CLUSTERED INDEX IDX_BD_ACCOUNTBANKS_NB_FK ON T_BD_ACCOUNTBANKS_NB ( FID );



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