Skip to Content
avatar image
Former Member

Link between ODLN and ORDR?

I'm working on a report on sales order that also includes delivery information. I figured out that in order to do this I would need to link the ORDR with ODLN table. Does anyone know what the common key between them is?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 24, 2017 at 09:46 PM

    Hi Vy,

    Without knowing what program your database is coming from no one here can answer that question. This would be something you need to ask either your vendor that made the program or your database administrator.

    Brian

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 12, 2017 at 02:11 PM

    Hi,

    This is link between ORDR and ODLN :

    SELECT t0.DocEntry,t1.LineNum
    FROM ODLN t0
    INNER JOIN DLN1 t1 ON t0.DocEntry=t1.DocEntry
    LEFT JOIN RDR1 t2 ON t1.BaseEntry=t2.DocEntry AND t1.BaseLine=t2.LineNum AND t1.BaseType=17 --(17 is sales order object type)
    LEFT JOIN ORDR t3 ON t2.DocEntry=t3.DocEntry

    Hope this helps :)

    Regards

    Add comment
    10|10000 characters needed characters exceeded