cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Dear Experts,

When we do query to link between base document and target document , what is differences between

1) inner join tableB on tableA.Trgetentry=tableB.DocEntry

and

2) inner join tableB on tableA.DocEntry=tableB.BaseEntry

?

why these two will return different result?

Thank you

0 Likes
View Entire Topic
Abdul
Active Contributor
0 Likes

Hi

I make Following joins and it gives correct results

Select * From ORDR inner Join RDR1 on ORDR.DocEntry = RDR1.DocEntry Inner Join DLN1 on RDR1.DocEntry = DLN1.BaseEntry and ORDR.ObjType = DLN1.BaseType

former_member419030
Active Participant
0 Likes

Dear Abdul Mannan,

Does the SO only has one DO?

How about if the SO linked to many DO?

Abdul
Active Contributor
0 Likes

It will work for multiple DOs as well but it will shows SO for which there is DO if you want to see SO without DO also thn try this

Select * From ORDR inner Join RDR1 on ORDR.DocEntry = RDR1.DocEntry Left Outer Join DLN1 on RDR1.DocEntry = DLN1.BaseEntry and ORDR.ObjType = DLN1.BaseType