Ya, I thought of that two, but I also don't want to run the select twice, you know? I'm hoping that there's some other way, but my hope is not so high...
I'm using SQL Server 2000 and I have a stored procedure where it's possibly to return up to 20,000 rows from the select statement inside. I would like to use the TOP function to just return the top 500 rows, and if there are over 500 rows (which I'll find out from @@rowcount) then I would like...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.