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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 order by

Author  Topic 

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2002-08-20 : 03:02:37

I have a recordset of about 30 records I want to order them by

CAT ID first then I would like to order them by FORUM_ID

how can I do this??


Thanks


Example

select cat_ID, forum_ID from forum_forum order by cat_ID

CATID FORUMID

3 5
3 7
3 8
4 1
4 3
4 4


Nico
Starting Member

18 Posts

Posted - 2002-08-20 : 03:21:53
ORDER BY first, second, third, fourth, etc

So in your case:
ORDER BY cat_ID, forum_ID

Go to Top of Page
   

- Advertisement -