February 13, 2008 at 1:31 pm
I am working in SQL Server 2000.
For testing purposes, how can I limit the number of rows returned from a cursor?
February 13, 2008 at 3:19 pm
Could you SELECT TOP ... when creating your cursor?
February 14, 2008 at 2:15 pm
Many thanks for suggesting the SELECT TOP ... option
It worked perfectly!
February 19, 2008 at 9:48 am
Hi,
Certainly you can restrict the no. of records using TOP, but this is performnace issue. It would be better to use to some WHERE condition to restrict the records.
Thanks -- Vj
February 19, 2008 at 3:03 pm
trigonom (2/13/2008)
I am working in SQL Server 2000.For testing purposes, how can I limit the number of rows returned from a cursor?
You didn't answer the question that came up right after your post... why do you think you need to use a cursor? What is it that you're trying to do? Lot's of good ways to avoid the slowness and overhead of a cursor...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply