Reputation: 2014
I would like to set limit for selected rows using parameter but obviously I can't write something like:
select top @count * from tbl
Also, I'm not very happy about turning select into string like:
exec('select top ' + casttovarchar(@count) + ' * from tbl')
Question: Is it posible and how to parametrize select top
?
Upvotes: 0
Views: 414