I'm having one of those brain-shuddering moments where I know the answer in SQL but can't get it quite right using LINQ to dataset - anyone help?
var deals =
from m in dtM AS Enumerable() // first part of query
select m.Field<Int32>("MerchantIdId") // runs down a standard table or list
(from d in dtD AS Enumerable() // sub query
orderby d.Field<Int32>("Seq") // returns first occurrence of a deal in table
// the two need bolting together so that for each record in dtM, I return the first
// occurrence of DealId in dtD
Thanks in advance.
*** update ***
I suppose what i'm lookin is nearly the equivalent of this which i found whilst searching:
SELECT OrderID, OrderDate
WHERE CustomerID = (SELECT CustomerID
View Complete Post