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
 SQL Server Development (2000)
 Can I have a diferent ...

Author  Topic 

PeterG
Posting Yak Master

156 Posts

Posted - 2004-08-19 : 19:01:02
order by clause in a query depending on a parameter passed to the stored proc without resorting to dynamic query?

Say, I want to order by fieldA when parameter value = 1; order by fieldB when value =2, etc.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-19 : 19:14:04
http://www.sqlteam.com/item.asp?ItemID=2209

Make sure to check the comments of that article:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=5942

Tara
Go to Top of Page
   

- Advertisement -