Operation Details
Description: This method returns bank accounts with the same account number for the specified concern.
Sterotype: ns
SQL
SELECT
  COUNT(*)
INTO
  :activeAccounts 
FROM
  ConcernRoleBankAccount,
  BankAccount 
WHERE ConcernRoleBankAccount.concernRoleID = :concernRoleID 
  AND ( BankAccount.accountNumber = :bankAccountNumber 
             OR BankAccount.iban = :ibanOpt)
  AND BankAccount.bankBranchID = :bankBranchID 
  AND ConcernRoleBankAccount.bankAccountID = BankAccount.bankAccountID