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 |
|
neutcomp
Posting Yak Master
111 Posts |
Posted - 2002-12-13 : 09:58:28
|
| Can you help me?Table: team, year, klass, relationteam: team_id, team_nameyear: year_id, year_nameklass: klass_id, klass_namerelation: rel_id, team_id, year_id, klass_idWhat I want is to view all available relations. And I want to sort them first with years DESC (2002, 2001, 2000, etc) then with team. And finally with klass.PreviewTeam: klass: year:Victory 1 | 1 | 2003Victory 1 | 1 | 2002Victory 2 | 1 | 2002Victory 3 | 2 | 2002Victory 4 | 4 | 2002Victory 2 | 2 | 2001Etc.ThanxxCyaBjorn |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-12-13 : 10:09:44
|
| Just join all the tables to relation using the relevant id then order by year desc, team, klass==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|