Click here to Skip to main content
14,738,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using following query in my stored procedure.

select top 5 * from tblTableOne.

but I need dynamic top no in my query. In sql server 2005 & 2008 i can use
"select top (@no) * from tblTableOne"

but I am using sql server 2000. so how can I do same thing in sql 2000.

Updated 19-Oct-12 22:18pm

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900