February 16, 2005 at 8:21 am
Folks,
Want to declare a scollling cusor in Sql Server 7. Using the following syntax:
DECLARE <cursor name> CURSOR SCROLL FOR SELECT * FROM <table name>
I get this message:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'SCROLL'.
Have passed the proc to a buddy who is using SQL Server 2000 and he had no problem. Tried another one with 2000 and he had the same trouble as me.
Can anyone help?
Thanks in advance.
February 16, 2005 at 9:15 am
I don't have SQL 7 with me now but I think the order should be:
DECLARE <cursor name> SCROLL CURSOR FOR SELECT * FROM <table name>
can you test that?
HTH
* Noel
February 16, 2005 at 9:58 am
Noel,
Discovered the problem - was using @ in front of the cursor name - parser did not like that - works without the @
BTW - your syntax also works but my syntax - without the @ - is Transact-SQL extended syntax (according to Microsoft).
Thanks for the post.
Jimmy
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply