Need help with a query - bill to and ship to at the line level
I'm writing some SQL to extract bill to and ship to location information for orders for import into the Oracle ERP cloud. We regularly change the line level bill to and ship to so the header level org ID's won't work.
I've written the following sql, but it seems there is a Cartesian join in the sql. If any of you can help me with a missing join, I would really appreciate it. The query below is hardcoded for BILL_TO. If I change the where clause to use the header invoice to org then the Cartesian join goes away.