Friday, 6 June 2014

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_NUMBER = '1000'));

No comments:

Post a Comment