This query can give details of all credit cards assigned to a person. This is applicable to Rel12.
SELECT party_name
, party_number
, ccnumber
, instrument_type
, chname "Name on the Card"
, expirydate
, finame
, card_issuer_code
, invalidation_reason
, loc.address1
, loc.address2
, loc.city
, loc.state
, loc.postal_code
FROM ar.hz_parties pty
, iby.iby_creditcard cc
, ar.hz_party_site_uses psu
, ar.hz_party_sites ps
, ar.hz_locations loc
WHERE pty.party_id = :party_id
AND pty.party_id = cc.card_owner_id
AND cc.addressid = psu.party_site_use_id
AND psu.party_site_id = ps.party_site_id
AND ps.location_id = loc.location_id
No comments:
Post a Comment