Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ORDER BY CASE
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01436398
Message ID:
01436443
Views:
37
>>I'm not sure what is so special about it? SQL Server allows expressions in ORDER BY clause.
>
>BOL2005 still only lists this as the possible order_by_expression:
>
>order_by_expression
>Specifies a column on which to sort. A sort column can be specified as a name or column alias, which can be qualified by the table name, or an expression. Multiple sort columns can be specified. The sequence of the sort columns in the ORDER BY clause defines the organization of the sorted result set.

>
>Absolutely no indication that CASE is a possibility.

You missed "or an expression" part. Anyway I learned it from Mike Levy here on UT not from BOL. :)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform