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!

PO number and Invoice Details Query in oracle EBS

Moatasem SheblNov 8 2017 — edited Nov 22 2017

Hello All,

Can you help me with that SQL query i need to select the PO number with the invoices details which mention in my query, that query is running with no end

select i.invoice_num,v.vendor_name,i.invoice_date,ps.due_date,

i.invoice_amount,i.amount_paid,ps.amount_remaining, SUM(i.invoice_amount)as"Invoice_Amount" ,sum(ps.amount_remaining)as "Amount_Remaining",pha.segment1 as PO_Number

FROMap_payment_schedules_all ps,
    ap_invoices_all i,
    po_vendors v,
    po_vendor_sites_all vs,
    po_headers_all pha

WHERE   i.invoice_id = ps.invoice_id

AND i.vendor_id = v.vendor_id
AND i.vendor_site_id = vs.vendor_site_id

group by v.vendor_name,i.invoice_num,i.invoice_date,ps.due_date,i.invoice_amount,i.amount_paid,

ps.amount_remaining,pha.segment1

Order by v.vendor_name,i.invoice_num;

Thank You

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2017
Added on Nov 8 2017
12 comments
24,216 views