cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR - the correlation name is specified multiple times in a from clause - How do I fix

keith_hitchner
Participant
0 Kudos

Hello Experts,

I am trying to build a query to obtain the Delivery dates for specific line items based on the Delivery documents and compare that to the Delivery date on the Sales Order form.

SELECT T0.[DocNum], T0.[TaxDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[ShipDate], T2.[DocNum], T2.[TaxDate], T3.[BaseRef], T3.[ShipDate]

FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] left outer JOIN DLN1 T3 on T3.BaseEntry = T0.DocEntry AND T1.LineNum=T3.BaseLine, ODLN T2 INNER JOIN DLN1 T3 ON T2.[DocEntry] = T3.[DocEntry]

I kind of understand that I am using an alias twice but I have no idea how to fix this. Any help is greatly appreciated.

I also know that I need to put in a where clause for the "closed" lines on the Sales Order.

Thank you Experts.

Keith H

Accepted Solutions (1)

Accepted Solutions (1)

former_member312729
Active Contributor
0 Kudos

Hi Keith

SELECT T0.[DocNum], T0.[TaxDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[ShipDate], T2.[DocNum], T2.[TaxDate], T3.[BaseRef], T3.[ShipDate] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] left outer JOIN DLN1 T3 on T3.BaseEntry = T0.DocEntry AND T1.LineNum=T3.BaseLine INNER JOIN ODLN T2 ON T2.[DocEntry] = T3.[DocEntry] where T1.Linestatus='C'

Regards:

Balaji.S

keith_hitchner
Participant
0 Kudos

Thank you - I believe this is exactly what they needed.

Answers (0)