DBA Data[Home] [Help]

VIEW: APPS.PO_CXML_PCARD_V

Source

View Text - Preformatted

SELECT NVL(aca.card_number,icc.ccnumber ),NVL( aca.cardmember_name,icc.chname) , NVL(aca.card_expiration_date,icc.expirydate) , acpa.card_brand_lookup_code , pha.type_lookup_code po_type_lookup_code , pha.po_header_id , to_number ( null ) po_release_id , pv.vendor_name , nvl ( aca.cardmember_name , pv.vendor_name ) card_name from ap_cards_all aca , ap_card_programs_all acpa , ap_card_suppliers_all acsa , po_vendors pv , po_headers_all pha, iby_creditcard icc WHERE pha.type_lookup_code = 'STANDARD' and pha.pcard_id = aca.card_id and aca.card_program_id = acpa.card_program_id and acsa.card_id ( + ) = pha.pcard_id and pv.vendor_id ( + ) = acsa.vendor_id and aca.card_reference_id (+) = icc.instrid union select NVL(aca.card_number,icc.ccnumber) ,NVL(aca.cardmember_name , icc.chname) , NVL(aca.card_expiration_date,icc.expirydate) , acpa.card_brand_lookup_code , pha.type_lookup_code po_type_lookup_code , pra.po_header_id , pra.po_release_id , pv.vendor_name , nvl ( aca.cardmember_name , pv.vendor_name ) card_name from ap_cards_all aca , ap_card_programs_all acpa , ap_card_suppliers_all acsa , po_vendors pv , po_headers_all pha , po_releases_all pra, iby_creditcard icc where pha.type_lookup_code <> 'STANDARD' and pha.po_header_id = pra.po_header_id and pra.pcard_id = aca.card_id and aca.card_program_id = acpa.card_program_id and acsa.card_id ( + ) = pra.pcard_id and pv.vendor_id ( + ) = acsa.vendor_id and aca.card_reference_id (+) = icc.instrid
View Text - HTML Formatted

SELECT NVL(ACA.CARD_NUMBER
, ICC.CCNUMBER )
, NVL( ACA.CARDMEMBER_NAME
, ICC.CHNAME)
, NVL(ACA.CARD_EXPIRATION_DATE
, ICC.EXPIRYDATE)
, ACPA.CARD_BRAND_LOOKUP_CODE
, PHA.TYPE_LOOKUP_CODE PO_TYPE_LOOKUP_CODE
, PHA.PO_HEADER_ID
, TO_NUMBER ( NULL ) PO_RELEASE_ID
, PV.VENDOR_NAME
, NVL ( ACA.CARDMEMBER_NAME
, PV.VENDOR_NAME ) CARD_NAME
FROM AP_CARDS_ALL ACA
, AP_CARD_PROGRAMS_ALL ACPA
, AP_CARD_SUPPLIERS_ALL ACSA
, PO_VENDORS PV
, PO_HEADERS_ALL PHA
, IBY_CREDITCARD ICC
WHERE PHA.TYPE_LOOKUP_CODE = 'STANDARD'
AND PHA.PCARD_ID = ACA.CARD_ID
AND ACA.CARD_PROGRAM_ID = ACPA.CARD_PROGRAM_ID
AND ACSA.CARD_ID ( + ) = PHA.PCARD_ID
AND PV.VENDOR_ID ( + ) = ACSA.VENDOR_ID
AND ACA.CARD_REFERENCE_ID (+) = ICC.INSTRID UNION SELECT NVL(ACA.CARD_NUMBER
, ICC.CCNUMBER)
, NVL(ACA.CARDMEMBER_NAME
, ICC.CHNAME)
, NVL(ACA.CARD_EXPIRATION_DATE
, ICC.EXPIRYDATE)
, ACPA.CARD_BRAND_LOOKUP_CODE
, PHA.TYPE_LOOKUP_CODE PO_TYPE_LOOKUP_CODE
, PRA.PO_HEADER_ID
, PRA.PO_RELEASE_ID
, PV.VENDOR_NAME
, NVL ( ACA.CARDMEMBER_NAME
, PV.VENDOR_NAME ) CARD_NAME
FROM AP_CARDS_ALL ACA
, AP_CARD_PROGRAMS_ALL ACPA
, AP_CARD_SUPPLIERS_ALL ACSA
, PO_VENDORS PV
, PO_HEADERS_ALL PHA
, PO_RELEASES_ALL PRA
, IBY_CREDITCARD ICC
WHERE PHA.TYPE_LOOKUP_CODE <> 'STANDARD'
AND PHA.PO_HEADER_ID = PRA.PO_HEADER_ID
AND PRA.PCARD_ID = ACA.CARD_ID
AND ACA.CARD_PROGRAM_ID = ACPA.CARD_PROGRAM_ID
AND ACSA.CARD_ID ( + ) = PRA.PCARD_ID
AND PV.VENDOR_ID ( + ) = ACSA.VENDOR_ID
AND ACA.CARD_REFERENCE_ID (+) = ICC.INSTRID