Amending SQL slightly brings me: ORA-01427: single-row subquery returns more than one row
Summary
ORA-01427Content
I am using Oracle Fusion, the finance/payables reporting side of things
I have the following code:
SELECT DISTINCT PHA.SEGMENT1
FROM
AP_INVOICES_ALL AIA, -- https://docs.oracle.com/en/cloud/saas/financials/19a/oedmf/AP_INVOICES_ALL-tbl.html
PO_HEADERS_ALL PHA -- https://docs.oracle.com/applications/farel12/procurementop_gs/OEDMP/PO_HEADERS_ALL_tbl.htm
WHERE
AIA.PO_HEADER_ID = PHA.PO_HEADER_ID
AND AIA.PO_HEADER_ID IS NOT NULL
AND AIA.INVOICE_NUM = XTE.TRANSACTION_NUMBER
AND AIA.INVOICE_ID = XTE.SOURCE_ID_INT_1
This "works" in that it returns no errors. However it's looking at the wrong table so wrong data is being brought back. No biggie, we have identified which table it is.