Subject Re: [ib-support] declare cursor
Author lester@lsces.globalnet.co.uk
> the purpose of this procedure is, with an existing table I added a new blank
> column "numero" and I want to fill it with a generator. I try to use the
> cursor to get every row and fill this field with the current value of the
> generator (I also don't know why the INTO statement is necesary in FOR
> SELECT statement so I have to use a dummy variable... I'm very newbie in IB
> ;)

If all you are trying to do is populate a new key column then the following
should work.

UPDATE "empleado" SET "numero" = GEN_ID("GEN_numero",1)

You don't need any more than that. It will just add a sequential number to the
"numero" field.

I use IB_WISQL from IBObjects and run it manually from the DSQL tab when I want
to update an imported table.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services