Hi,
Database version: 10g
Oracle APPS Version: 12.1.3
Basically the requirement is to pull the one row for the ORG (Operating Unit) for a vendor, vendor site and one payment method code combination from ap_suppliers and ap_supplier_sites_all table.
Below query giving me all vendor and vendor site details for an Org, but i need one row per Org (Operating Unit) for any one single vendor and vendor site and a payment method code. Please suggest
select asp.vendor_id,
asa.vendor_site_id,
asp.vendor_name,
asa.payment_method_lookup_code,
asa.org_id from
ap_suppliers asp,
ap_supplier_sites_all asa
where 1=1
and asp.vendor_id = asa.vendor_id
and enabled_flag = 'Y'
and inactive_date IS NULL
and org_id = 101
and asa.hold_all_payments_flag = 'N'
GROUP BY asp.vendor_id,
asa.vendor_site_id,
asp.vendor_name,
asa.payment_method_lookup_code,
asa.org_id;
Regards
Sri