Subject Re: Firebird record number
Author legrand_legrand_63
> Hi,
> i don't know if my trouble is about sql or about firebird but i would
> like to return the record number of each record in a table,
> so a kind of :
> "select field1, field2..., recnumber as myfield from mytable.
>
> i try also with rownumber etc... but no success
>
> Thanks for your help
> Julien
>


Salut,
Firebird has a pseudo column called ROW_NUM that answer your question,
but it is only available in PSQL:
http://www.janus-software.com/fbmanual/manual.php?book=PSQL&topic=96

With this ROW_NUM you should be able to write a procedure returning
the "rownumber" (In fact even without it, you should be able to write
a procedure counting records before to return them).

And last Fyracle (Firebird Oracle-mode) has a rownum feature available
in its Firebird distribution
http://www.janus-software.com/runtime_dl.html (but please don't use it
for prod it is a frozen project ;o)

Regards
PAscal
Regards
PAscal