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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-11-07 : 09:20:23
|
| writes "Like the subject says, we've seen it but...Is there a way to order records by multiple columns using the CASE statement?Like:ORDER BYCASE @sort WHEN 0 THEN column1, column2 WHEN 1 THEN column2, column1ENDI keep getting "incorect sintax near ','..."My fountain of SQL knowledge is drying up here... Is there a oasis in sight???" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-11-07 : 09:40:23
|
| When you fountain dries up, you should look into tapping the SEARCH reservoir ...Dynamic ORDER BYJay White{0} |
 |
|
|
|
|
|