Subject Re: [ib-support] declare cursor
Author Paul Reeves
Jordi Gálvez wrote:
>
> Hi!
>
> how can I create a cursor? the documentation talks about something like:
>
> DECLARE cursor CURSOR FOR <select> [FOR UPDATE OF <col> [, <col>.]];
>
> available in SQL, but this doesn't works, it gives me an invalid token error
> just in the cursor name
>

DECLARE CURSOR is an embedded SQL construct. Should work fine if you are using
embedded SQL. Wont work at all if you are not.

As Helen says, if you are working within stored procedures use the FOR SELECT DO
style open a cursor onto
each row and process it.


Paul
--

Paul Reeves
http://www.ibphoenix.com
taking InterBase further