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:
00550494
Views:
14
I share your pain.... I am really shocked that MS hasn't addressed this need yet. I have beat my head up against this several times in the last few months.

Maybe your SET ROWCOUNT suggestion is the way to go. From my quick test, SET ROWCOUNT seems to be scoped to the procedure in which it is specified.




>>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.
>
>As I replied to Bob, this downside is a showstopper in my case. This SProc is going to be _very_ heavily used, and the need to compile on every hit would be a majorly costly endeavor ($ wise).
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
Reply
Map
View

Click here to load this message in the networking platform