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 |
|
skippy2727
Starting Member
1 Post |
Posted - 2009-11-05 : 04:04:47
|
| I wish to order each record in a subset of a resultset alongside a record in a subset of the same resultset w.r.t two specific fields, i.e age and handle:time name surname age occupation handle12:20 Sam Gamgee 27 liontamer grr12:21 Peter Postlewaite 52 dancer tippytap12:22 Simon Cowell 98 heckler blech...15:42 Hello Kitty 98 cat blech15:43 Roger Moore 27 lecherer grr15:43 Sammy Davis 52 artiste tippytapI'd like to order them as such:12:20 Sam Gamgee 27 liontamer grrr15:43 Roger Moore 27 lecherer grr12:21 Peter Postlewaite 52 dancer tippytap15:43 Sammy Davis 52 artiste tippytap12:22 Simon Cowell 98 heckler blech15:42 Hello Kitty 98 cat blechHow do I make the select statement to group them as above? have tried using a query in a query, but the syntax is giving me issues... |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-11-05 : 04:37:01
|
| can u post the query and the error message |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-11-05 : 04:39:18
|
That is no grouping - it is ordering.select ...from ...order by age,time No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|