select v.vendor_name,
cc.segment1,
cc.segment2,
cc.segment3,
cc.segment4,
nvl(sum(d.amount),0)
from ap_invoice_distributions_all d,
ap_invoices_all i,
po_vendors v,
gl_code_combinations cc
where v.vendor_id = i.vendor_id
and v.one_time_flag = 'Y'
and d.dist_code_combination_id = cc.code_combination_id
and d.invoice_id = i.invoice_id
and d.accounting_date = 'begin date'
and d.accounting_date = 'end date'
and d.org_id = your org_id
group by v.vendor_name, cc.segment1, cc.segment2, cc.segment3, cc.segment4
cc.segment1,
cc.segment2,
cc.segment3,
cc.segment4,
nvl(sum(d.amount),0)
from ap_invoice_distributions_all d,
ap_invoices_all i,
po_vendors v,
gl_code_combinations cc
where v.vendor_id = i.vendor_id
and v.one_time_flag = 'Y'
and d.dist_code_combination_id = cc.code_combination_id
and d.invoice_id = i.invoice_id
and d.accounting_date = 'begin date'
and d.accounting_date = 'end date'
and d.org_id = your org_id
group by v.vendor_name, cc.segment1, cc.segment2, cc.segment3, cc.segment4
No comments:
Post a Comment