Convert query from native SQL to LINQ request
Posted
by mike
on Stack Overflow
See other posts from Stack Overflow
or by mike
Published on 2010-03-19T09:29:07Z
Indexed on
2010/03/19
9:31 UTC
Read the original article
Hit count: 384
c#
|linq-to-sql
Please, help me. How i can translate this SQL query to LINQ request?
SELECT TOP (1) PERCENT DATEDIFF(DAY, dbo.PO.ORDER_DATE, GETDATE()) AS Age
FROM dbo.ITEMS INNER JOIN
dbo.X_PO ON dbo.ITEMS.ITEMNO = dbo.X_PO.ITEM_CODE INNER JOIN
dbo.PO ON dbo.X_PO.ORDER_NO = dbo.PO.DOC_NO AND dbo.X_PO.STATUS = dbo.PO.STATUS
WHERE (dbo.ITEMS.ITEMNO = 'MBIN001') AND (dbo.X_PO.STATUS = 3)
ORDER BY Age
© Stack Overflow or respective owner