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