Howdy, Ruzsi.
What do u mean by "recount the sorszam continously from 0 to 34" ?
The sorszam is only allowed to take values on that range? Is That ?
Best,
Oliveiros
----- Original Message -----
From: "Ruzsinszky Attila" <ruzsinszky.attila@gmail.com>
To: <pgsql-novice@postgresql.org>
Sent: Wednesday, September 02, 2009 9:42 AM
Subject: [NOVICE] Modifying selected records
Hi,
I've got a subselect which output is this:
sorszam(int);all_kod(varchar);nev(varchar);megall(int);erkezik_ido(time);indul_ido(time);train_selector(varchar)
0;"5510017";"Budapest-Keleti pu.";1;"06:10:00";"06:10:00";"910_365334"
...
21;"5501289";"Győr";1;"07:39:00";"07:39:00";"910_365334"
0;"5501289";"Győr";1;"07:41:00";"07:41:00";"910_311546"
...
5;"5544800";"Csorna";1;"08:00:00";"08:00:00";"910_311546"
0;"5544800";"Csorna";1;"08:12:00";"08:12:00";"910_365339"
...
8;"5502246";"Szombathely";1;"09:02:00";"09:02:00";"910_365339"
I would like this:
...
x;"5501289";"Győr";1;"07:39:00";"07:41:00";"910_xxxxxx"
...
y;"5544800";"Csorna";1;"08:00:00";"08:12:00";"910_yyyyyy"
...
and I'd like recount the sorszam continously from 0 to 34.
Can I do this with SQL or I need PL/pgPerl, for example?
TIA,
Ruzsi
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice