Subject Re: [firebird-support] Row_Number () over (partition by field1 order by field 2 desc) as ROWNUMBER
Author Alexandre Benson Smith
Em 27/3/2014 09:39, Erik Drescher escreveu:
> Hey there,
>
> I use Firebird 2.5 and look after a alternative function ti
> use Row_Number () over (partition by field1 order by field 2 desc) as ROWNUMBER
> This works great on Firebird 3, but does anybody knows a good alternative?
>
> thanks
>
> erik
>

You can try a Stored Procedure or a sub-select.

A simples example, may not reflect what you need, but you will get the
idea...

select
c.country, (select count(*) from country c2 where c2.country <=
c.country)
from
country c
order by
c.country