How to join between WSH_DELIVERY_DETAILS and ra_customer_trx_lines_all
Hello community,
I'm trying to link the WSH_DELIVERY_DETAILS
table to the RA_CUSTOMER_TRX_LINES_ALL
table to retrieve the delivery name information. Initially, I joined them using the sales order, but this approach isn't reliable as the sales order number isn't a unique identifier—it returns two rows, only one of which has the correct delivery name.
SELECT DISTINCT WND.delivery_name
FROM WSH_DELIVERY_DETAILS WDD,
WSH_NEW_DELIVERIES WND,
WSH_DELIVERY_ASSIGNMENTS WDA,
ra_customer_trx_lines_all trxl
WHERE WDA.DELIVERY_ID = WND.DELIVERY_ID
AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID
Tagged:
0