EIS Report Giving Error ORA-00907
948276Jul 9 2012 — edited Jul 18 2012Hi everyone, I've got a SQL query that I am able to run in SQL Developer and seems to run fine, but when I move it over to EIS to have the query generate a report for the users to utilize, I am getting the ORA-00907 error message. Any thoughts? I don't see where I would be missing a right parenthesis. Any help would be much appreciated. Thanks!
SELECT aps.vendor_name "Supplier Name"
,aps.segment1 "Supplier Number"
,aia.invoice_num "Invoice Number"
,aila.line_number "Invoice Line Number"
,NVL(aha.hold_lookup_code, 'No Holds') "Hold Lookup Code"
,NVL(ahc.description , 'No Holds') "Hold Description"
,pha.segment1 "PO Number"
,pla.line_num "PO Line Number"
,plla.shipment_num "PO Shipment Number"
,aia.creation_date "Invoice Creation Date"
,aha.hold_date "Hold Date"
,papf.full_name "Buyer Name"
,haou.name "Branch Name"
,aila.accounting_date "GL Date"
,NVL(aha.release_lookup_code, 'No Holds') "Release Lookup Code"
,NVL(aha.release_reason, 'No Holds') "Release Reason"
,DECODE(aha.release_lookup_code, NULL, NULL, aha.last_update_date) "Release Date"
FROM ap.ap_invoices_all aia
,ap.ap_invoice_lines_all aila
,ap.ap_holds_all aha
,ap.ap_suppliers aps
,po.po_line_locations_all plla
,po.po_lines_all pla
,po.po_headers_all pha
,ap.ap_hold_codes ahc
,PO.po_agents poa
,HR.per_all_people_f papf
,HR.hr_all_organization_units haou
WHERE aps.vendor_id = aia.vendor_id
AND aia.invoice_id = aila.invoice_id
AND aila.po_line_location_id = plla.line_location_id
AND plla.po_line_id = pla.po_line_id
AND pla.po_header_id = pha.po_header_id
AND aila.po_line_location_id = aha.line_location_id(+)
AND aila.match_type = 'ITEM_TO_PO'
AND aha.hold_lookup_code = ahc.hold_lookup_code(+)
AND pha.agent_id = poa.agent_id
AND poa.agent_id = papf.person_id
and SYSDATE between papf.effective_start_date and papf.effective_end_date
and plla.ship_to_organization_id = haou.organization_id
Edited by: 945273 on Jul 9, 2012 11:17 AM