/* Formatted on 2013/03/18 10:34 (Formatter Plus v4.8.8) */
SELECT gjb.NAME, gjh.je_source, gjh.period_name, gjl.je_line_num,
xal.accounted_dr, xal.accounted_cr, supp.vendor_name, inv.invoice_num,
pla.lease_num, pla.NAME lease_name,
TO_CHAR (plda.lease_commencement_date,
'DD-MON-YYYY'
) lease_commencement_date,
TO_CHAR (plda.lease_termination_date, 'DD-MON-YYYY') lease_expiry_date
FROM gl_import_references gir,
gl.gl_je_batches gjb,
gl.gl_je_headers gjh,
gl.gl_je_lines gjl,
xla.xla_ae_lines xal,
xla.xla_ae_headers xah,
xla.xla_events xe,
xla.xla_transaction_entities xte,
gl.gl_code_combinations gcc,
pn.pn_payment_items_all ppia,
pn.pn_payment_terms_all ppta,
pn.pn_leases_all pla,
ap_invoices_all inv,
ap_suppliers supp,
po_vendor_sites_all pvsa,
pn_lease_details_all plda
WHERE 1 = 1
AND gjh.je_source = 'Payables'
AND gjb.status = 'P'
AND gjb.je_batch_id = gjh.je_batch_id
AND gjh.je_header_id = gjl.je_header_id
AND gjh.ledger_id = gjl.ledger_id
AND gir.je_batch_id = gjb.je_batch_id
AND xal.gl_sl_link_id = gir.gl_sl_link_id
AND xal.gl_sl_link_table = gir.gl_sl_link_table
AND gcc.code_combination_id = xal.code_combination_id
AND gjl.code_combination_id = xal.code_combination_id
AND gjl.je_header_id = gir.je_header_id
AND gjl.je_line_num = gir.je_line_num
AND xal.ae_header_id = xah.ae_header_id
AND xal.application_id = xah.application_id
AND xah.event_id = xe.event_id
AND xah.application_id = xe.application_id
AND xe.entity_id = xte.entity_id
AND xah.entity_id = xte.entity_id
AND gjl.code_combination_id = gcc.code_combination_id
AND gjb.chart_of_accounts_id = gcc.chart_of_accounts_id
AND ppia.ap_invoice_num(+) = xte.transaction_number
AND ppia.payment_term_id = ppta.payment_term_id(+)
AND ppta.lease_id = pla.lease_id(+)
AND xte.source_id_int_1 = inv.invoice_id(+)
AND inv.vendor_id = supp.vendor_id(+)
AND pla.lease_id = plda.lease_id(+)
AND pvsa.vendor_site_id(+) = ppta.vendor_site_id
AND inv.invoice_id = 617917
SELECT gjb.NAME, gjh.je_source, gjh.period_name, gjl.je_line_num,
xal.accounted_dr, xal.accounted_cr, supp.vendor_name, inv.invoice_num,
pla.lease_num, pla.NAME lease_name,
TO_CHAR (plda.lease_commencement_date,
'DD-MON-YYYY'
) lease_commencement_date,
TO_CHAR (plda.lease_termination_date, 'DD-MON-YYYY') lease_expiry_date
FROM gl_import_references gir,
gl.gl_je_batches gjb,
gl.gl_je_headers gjh,
gl.gl_je_lines gjl,
xla.xla_ae_lines xal,
xla.xla_ae_headers xah,
xla.xla_events xe,
xla.xla_transaction_entities xte,
gl.gl_code_combinations gcc,
pn.pn_payment_items_all ppia,
pn.pn_payment_terms_all ppta,
pn.pn_leases_all pla,
ap_invoices_all inv,
ap_suppliers supp,
po_vendor_sites_all pvsa,
pn_lease_details_all plda
WHERE 1 = 1
AND gjh.je_source = 'Payables'
AND gjb.status = 'P'
AND gjb.je_batch_id = gjh.je_batch_id
AND gjh.je_header_id = gjl.je_header_id
AND gjh.ledger_id = gjl.ledger_id
AND gir.je_batch_id = gjb.je_batch_id
AND xal.gl_sl_link_id = gir.gl_sl_link_id
AND xal.gl_sl_link_table = gir.gl_sl_link_table
AND gcc.code_combination_id = xal.code_combination_id
AND gjl.code_combination_id = xal.code_combination_id
AND gjl.je_header_id = gir.je_header_id
AND gjl.je_line_num = gir.je_line_num
AND xal.ae_header_id = xah.ae_header_id
AND xal.application_id = xah.application_id
AND xah.event_id = xe.event_id
AND xah.application_id = xe.application_id
AND xe.entity_id = xte.entity_id
AND xah.entity_id = xte.entity_id
AND gjl.code_combination_id = gcc.code_combination_id
AND gjb.chart_of_accounts_id = gcc.chart_of_accounts_id
AND ppia.ap_invoice_num(+) = xte.transaction_number
AND ppia.payment_term_id = ppta.payment_term_id(+)
AND ppta.lease_id = pla.lease_id(+)
AND xte.source_id_int_1 = inv.invoice_id(+)
AND inv.vendor_id = supp.vendor_id(+)
AND pla.lease_id = plda.lease_id(+)
AND pvsa.vendor_site_id(+) = ppta.vendor_site_id
AND inv.invoice_id = 617917
No comments:
Post a Comment