LINQ: OrderBy with nullable columns in TypedDataSets
evensQuery = (From task In tblTaskShow.AsEnumerable _
Select task Order By IIf(IsDBNull(task("TRNDATE")), "", task("TRNDATE")), task("MAC"))
在 Order By 之後判斷是否空值,以空字串取代
IIf(IsDBNull(task("TRNDATE")), "", task("TRNDATE"))
沒有留言:
張貼留言