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 |
|
darkmooink
Starting Member
5 Posts |
Posted - 2006-07-03 : 10:39:32
|
| how can i set a select statement is sorted by one thing and then by another thing ect |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-07-03 : 10:41:12
|
| Something likeOrder by case when col='One thing' then 1 when col='some thing' then 2 else 3 endor post some sample data and the result you wantMadhivananFailing to plan is Planning to fail |
 |
|
|
darkmooink
Starting Member
5 Posts |
Posted - 2006-07-03 : 10:54:17
|
| what it is, i have a dance steps tabelid|dance id|step no| step discription|tag|restart|1|1|1|somekind of step|0|0|2|1|0|another step|1|0|3|1|2|a diffrent step|0|0|and i want them done so that tag is sorted first then step no so it lookes like this1|1|1|somekind of step|0|0|3|1|2|a diffrent step|0|0|2|1|0|another step|1|0| |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-07-03 : 10:57:42
|
[code]select *from tableorder by tag, step_no[/code] KH |
 |
|
|
darkmooink
Starting Member
5 Posts |
Posted - 2006-07-03 : 11:16:20
|
| thanks works a treet |
 |
|
|
|
|
|