Tuesday, January 2, 2018

Query to find Suppliers/ Sites with 'Receipt' match option.

SELECT
    aps.vendor_id,
    aps.vendor_name,
    DECODE(aps.match_option,'P','Purchase Order','R','Receipt') match_option_suppiers,
    apssa.vendor_site_id,
    DECODE(apssa.match_option,'P','Purchase Order','R','Receipt') match_option_suppier_sites
FROM
    apps.ap_suppliers aps,
    apps.ap_supplier_sites_all apssa
WHERE    aps.vendor_id = apssa.vendor_id
     AND    aps.match_option = 'R'
     AND    apssa.match_option = 'R'
     AND    purchasing_site_flag IS NOT NULL;

2 comments: