phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: ROW_NUMBER() in Phoenix
Date Tue, 11 Apr 2017 23:39:14 GMT
Hi Bernard,
No support for ROW_NUMBER() in Phoenix. The closest you could get would be
to create a unique sequence on the fly (using a caching size of
Long.MAX_VALUE to prevent any RPCs) and then use a NEXT VALUE FOR
<seq_name> to generate the row number.
Thanks,
James


On Tue, Apr 11, 2017 at 3:57 PM, Bernard Quizon <
bernard.quizon@stellarloyalty.com> wrote:

> Hi,
>
> Is there something similar to ROW_NUMBER()
> <https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions137.htm> in
> Phoenix?
>
> Or any alternatives to displaying the row number like this:
>
> row_number,name,purchases
> 1,John,9999
> 2,Joseph,999
> 3,Jordan,99
>
>
> Thanks!
>

Mime
View raw message