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 TOP n in SELECT

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-28 : 09:28:12
Jay Mendiola writes "Is there any way inside a stored proc, without using the "EXEC(dynamic sql stmts)", to build a "SELECT TOP n FROM tablename WHERE..." where n is variable.

I tried making n a param but this did not work. Also tried to set "TOP n" as a param but this did not work either.

Thanks in advance

Jay Mendiola"
   

- Advertisement -