Geekdom Concerto
2012年5月9日
SQL Server OrderBy Nulls Last
Oracle的特異功能還真多~ ^^y
很少直接下command了.. ( ̄▽ ̄///)
筆一下
Linq
dcx.Task.Where(t => t.EventId == parentId).OrderBy(t => !t.StartDate.HasValue).ThenBy(t => t.StartDate)
Command
SELECT * FROM Task WHERE EventId=@parentId ORDER BY ISDATE(StartDate) DESC, StartDate
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言