Showing posts with label How can you query the bank account associated with a Supplier Site in R12?. Show all posts
Showing posts with label How can you query the bank account associated with a Supplier Site in R12?. Show all posts

Monday, 2 May 2011

How can you query the bank account associated with a Supplier Site in R12?


How can you query the bank account associated with a Supplier Site in R12?

In R12 a Supplier Site is stored, in TCA, as a Party_Site. The Party Site has the Party ID of the Party that represents the Supplier record.
SELECT BANK_ACCOUNT_NAME, BANK_ACCOUNT_NUM
FROM IBY_EXT_BANK_ACCOUNTS
WHERE EXT_BANK_ACCOUNT_ID IN
(SELECT EXT_BANK_ACCOUNT_ID
FROM IBY_ACCOUNT_OWNERS
WHERE ACCOUNT_OWNER_PARTY_ID IN
(SELECT party_id
FROM hz_party_sites
WHERE party_site_name = ‘<site name>’));