Subject Re: [ib-support] CURSOR or WHERE CURRENT OF in a stored procedure
Author Helen Borrie
At 09:28 AM 5/06/2003 +0200, you wrote:
>Hi,
>
>Right - I've found the syntax after all ...
>
> > I've been searching high and low, but cannot find it ...
>
>But - how does it work? Do you need to at least
>select the primary key columns in the FOR SELECT
>clause in order to update such a table? Is there a
>usuable example out there?

It's only available in embedded SQL....and FOR SELECT is only available in
PSQL. In ESQL, the declared cursor's WHERE clause determines which rows
the cursor will step on and WHERE CURRENT OF specifies that the operation
visits those rows. It's equivalent to (in PSQL) specifying the cursor set
with FOR SELECT and looping through each row, performing your block of code
on each one.

If you *really* have a fatal urge to use WHERE CURRENT OF in a stored
procedure, you could use MSSQL Server...<ducks>

heLen