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 - 2005-11-15 : 07:33:01
|
| darren writes "hi, guys i have a question on dynamic sql sortingif i doselect lastName, firstNamefrom Nameorder by lastName, firstNameit's automatically sorted by lastName by ascending order, and firstName by ascending orderif i want to sort lastName by ascending order, and firstName by descending order, what should i do??select lastName, firstNamefrom Nameorder by lastName asc, firstName decthe above code gives me a syntax errorthanks for helping me" |
|
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2005-11-15 : 07:56:33
|
| It should be desc not dec |
 |
|
|
|
|
|