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)
 Order by clauses based on conditions

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-28 : 09:35:55
Shaloo writes "If a procedure gets 2 parameters as the 'column name' by which the records are to be sorted and second as the 'ascending/descending' order, is there a better method to write the query than a lot of IF statements and having a different order by clause for each statement.

Thanks,
Shaloo"
   

- Advertisement -