Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Syntax
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01098559
Message ID:
01098576
Views:
16
The @@CURSOR_ROWS can return a negative number for a static cursor under some circumstances. See @@CURSOR_ROWS in BOL for details.
A usual cursor loop has following structure
FETCH NEXT ... 
WHILE @@FETCH_STATUS = 0
BEGIN
...
FETCH NEXT ... 
END
Anyway, I don't see from your code why do you need a cursor in the first place.

>I figured it out, had to set cursor as static.
>
>
>Using sql 2000
>
>I'm trying to do a query I'm working in QA. When I get set the @tiDocs variable to @@Cursor_rows, it return -1. If I just run the query by itself, I get 148 records. What am I missing?
>
<snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform