cursor and rowcount

  • I have a cursor declared that I would like to limit. I would like to have it return only 13 rows. I tried using set rowcount before and after the DECLARE selects the rows in, but it doesn't work. Anyone know a good way to do this?

    Thanks.

    Andrew J. Hahn


    Andrew J. Hahn

  • SET ROWCOUNT 13

    GO

    select * from table

    GO

  • you could use TOP in the select statement of your cursor...

    DECLARE CursorName CURSOR FOR

    Select Top 13 ......

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply