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 Select

Author  Topic 

Nick
Posting Yak Master

155 Posts

Posted - 2001-10-15 : 09:11:08
I'm trying to write a dynamic select statement in a stored procedure. Among the things I pass is if I want the bottom or top of the resulting query, and how many records I want.

But when I try something like:

SELECT @direction @numToSelect....

I get an error. How do I go about doing this?

   

- Advertisement -