请帮帮我。我如何将此SQL查询转换为LINQ请求?
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
答案 0 :(得分:1)
如果有人在这里为你创造这个,谁会创建你的第二个?
我建议从这个例子开始,一点一点地找到方法。