Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Open Interface Rejects - SQL Report

948276Jul 18 2012 — edited Jul 18 2012
Hi guys, I'm trying to help out some folks in AP with an easier access to view Open Interface rejects. I already knew the relation between AP_INVOICES_INTERFACE and AP_INTERFACE_REJECTIONS was INVOICE_ID AND PARENT_ID (respectively). Now I've seen that some invoices also have a relation between AP_INVOICE_LINES_INTERFACE and AP_INTERFACE_REJECTIONS, same columns related (INVOICE_ID AND PARENT_ID respectively).

What I'm having a problem with, maybe I've just been sitting here too long, but I cannot get it all into one report.

I tried this, but it's giving me way more records than it should:

SELECT AIR.CREATION_DATE
, AIR.REJECT_LOOKUP_CODE
, AII.PO_NUMBER
, AII.GROUP_ID
, AII.VENDOR_NUM
, AII.INVOICE_NUM
, AII.INVOICE_DATE
, AII.INVOICE_AMOUNT
, AII.SOURCE
FROM AP.AP_INTERFACE_REJECTIONS AIR
, AP.AP_INVOICES_INTERFACE AII
, AP.AP_INVOICE_LINES_INTERFACE AILI
WHERE (AII.INVOICE_ID = AIR.PARENT_ID AND AII.ORG_ID = 162)
OR (AILI.INVOICE_ID = AIR.PARENT_ID AND AILI.ORG_ID = 162)

Any thoughts on where I mucked it up or how I could actually go about this? What shows in the actual Open Interface app is a good start, it's just missing some fields like vendor name and reject lookup code.

Thanks for any help!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2012
Added on Jul 18 2012
3 comments
4,087 views