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)
 Dynamic Order By in T-SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-06 : 09:34:49
Drew writes "I have an ASP page with a simple HTML Table. I populate the table with a recordset from a stored procedure. I would like for my users to be able to select which field the recordset is sorted by and pass that to my SQL statement in my stored procedure, but I can't use variables for field names in the Order By clause. And it seems that E-SQL doesn't return recordsets. Is there a way to do this?

Using SQL 7.0 sp2 & NT4.0 sp4 or sp6.

Thanks,
Drew"
   

- Advertisement -