Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized TOP n
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00550093
Message ID:
00550325
Views:
11
Hey Erik. I've worked around this by constructing the statement as a string, and using EXECUTE to run the query. Downside (and a biggie) is that SQL Server won't be able to pre-compile and all that good stuff.



>I know that SQL doesn't directly support a parameterized TOP n clause, but is there a common work around? Will SET ROWCOUNT work?
>
>The Stored Proc in question will be used in _extremely_ high volume, so I also need to keep processing power to a minimum.
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform