Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Need help with the PL/SQL query

3166653Feb 22 2016 — edited Feb 23 2016

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

This post has been answered by CarlosDLG on Feb 22 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2016
Added on Feb 22 2016
12 comments
3,852 views