Sunday, 17 January 2016

Invoices Header+Distribution+Lines (Query)

http://aporaclepayables.blogspot.com/2016/01/invoices-headerdistributionlines-query.html

begin
MO_GLOBAL.SET_POLICY_CONTEXT('S', '?');
end;

-------------------------------------------------------

select count(*) from ap_invoices_all aia, ap_invoice_lines_all aila, ap_invoice_distributions_all aida
,ap_invoices_V aiv
where aia.invoice_id=aila.invoice_id
and aia.invoice_id=aida.invoice_id
and aila.invoice_id=aida.invoice_id
and aila.line_number=aida.invoice_line_number
and aiv.invoice_id=aia.invoice_id
and aiv.invoice_id=aila.invoice_id
and aiv.invoice_id=aida.invoice_id
--and aia.org_id=?
--and aida.invoice_id=10305  ---249912

1 comment: