6
Answers

SQL to Linq query [Inner Join]

Vijay

Vijay

10y
1.3k
1
How to write SQL to Linq Query [i.e.Inner Join]


 SELECT * FROM  Products pp WITH (NOLOCK) 
 INNER JOIN (SELECT TOP 1 Shiftdate,ShiftID, Period FROM Products WITH (NOLOCK) 
 WHERE ProuductId  =100 AND OrderId =5 ORDER BY Shiftdate DESC, ShiftID DESC,Period DESC) ss 
 ON  pp.Shiftdate = ss.Shiftdate AND pp.ShiftID = ss.ShiftID AND pp.Period = ss.Period 
 WHERE  ProuductId  = 100 AND OrderId = 5 ORDER BY DelyId
Answers (6)