Vijay

Vijay

  • NA
  • 150
  • 88.9k

SQL to Linq query [Inner Join]

Mar 24 2014 6:31 AM
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)