Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
amsqlguy
Yak Posting Veteran
89 Posts |
Posted - 2012-03-05 : 12:23:17
|
Guys,Is it possible to sort in the following order for a column which starts special characters and alpha numeric characters.!"$?@^{>123456789ABCDThanks |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2012-03-05 : 12:27:44
|
Sure...SELECT * FROM (SELECT '!'AS [CHAR] UNION ALLSELECT '"'AS [CHAR] UNION ALLSELECT '$'AS [CHAR] UNION ALLSELECT '?'AS [CHAR] UNION ALLSELECT '@'AS [CHAR] UNION ALLSELECT '^'AS [CHAR] UNION ALLSELECT '{'AS [CHAR] UNION ALLSELECT '>'AS [CHAR] UNION ALLSELECT '1'AS [CHAR] UNION ALLSELECT '2'AS [CHAR] UNION ALLSELECT '3'AS [CHAR] UNION ALLSELECT '4'AS [CHAR] UNION ALLSELECT '5'AS [CHAR] UNION ALLSELECT '6'AS [CHAR] UNION ALLSELECT '7'AS [CHAR] UNION ALLSELECT '8'AS [CHAR] UNION ALLSELECT '9'AS [CHAR] UNION ALLSELECT 'A'AS [CHAR] UNION ALLSELECT 'B'AS [CHAR] UNION ALLSELECT 'C'AS [CHAR] UNION ALLSELECT 'D') AS XXXORDER BY [CHAR] What's the question again?Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxWant to help yourself?http://msdn.microsoft.com/en-us/library/ms130214.aspxhttp://weblogs.sqlteam.com/brettk/http://brettkaiser.blogspot.com/ |
 |
|
|
|
|