Subject Re: [firebird-support] how to on store procedure
Author Sándor Tamás (HostWare Kft.)
You should consider using generator for this.

CREATE GENERATOR table_gen;
SET GENERATOR table_gen TO 1;

And then:

update table_name
set field1 = gen_id(table_gen,1);

This will solve your problem.

SanTa

----- Original Message -----
From: "jesus" <sierraja2000@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, November 12, 2009 12:33 PM
Subject: [firebird-support] how to on store procedure


> Hello! every people
>
> I need values increase sequentially for fill the field, for example:
>
> i have the table (5 record):
>
> field1 field2 field3
> null Jhon 23
> null peter 22
> null carl 19
> null Katherine 15
> null sthefany 20
>
> I need the same table but information next:
>
> field1 field2 field3
> 1 Jhon 23
> 2 peter 22
> 3 carl 19
> 4 Katherine 15
> 5 sthefany 20
>
> This change i need in store proceduce. The system is firbird 1.5
>
> Thank You, yours help
>
>
>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>