CREATE view vv_RegistryBankTransferPrepareName
as
  select MAX(CAST(Oid AS CHAR(100)))  Oid,
         BankPrepareName
  from RegistryBankTransfer
  where Ifnull(BankPrepareName,'')<>''
  group by BankPrepareName
