Monday, March 18, 2013

Customer and its bank relation

select hp.party_name customer_name,hp.party_name,


ieb.bank_name,ieba.bank_account_num,ieba.branch_id

--,ieba.*

from hz_parties hp,

IBY_ACCOUNT_OWNERS iao,

IBY_EXT_BANK_ACCOUNTS ieba,

IBY_EXT_BANKS_V ieb

--, hz_parties branch

where hp.party_id =22052

and iao.account_owner_party_id = hp.party_id --party_id of customer

and iao.ext_bank_account_id = ieba.ext_bank_account_id

and ieb.bank_party_id = ieba.bank_id;

No comments: