csharpeasy
Useful C# & .NET tips
Friday, February 18, 2011
Grouping items in Order By Statement
I like this!!!
...
ORDER BY
CASE WHEN column = 'this' THEN 2 ELSE 1 END asc,
othercolumn asc,
another column desc
...
to group items separately and then apply a secondary sorting within each group...
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)