Link to home
Start Free TrialLog in
Avatar of Simone Micieli
Simone Micieli

asked on

Alternative of row_number() on Sybase SQL

Hi all,

I'm working on Sybase DB and I need to use the following function: ROW_NUMBER() OVER (ORDER BY ID ASC)
Unfortunately this function can't be used on Sybase SQL, so I need to use an equivalent of it.

I found solutions involving the creation of temporary table or cursors, but I can't use ant of them.

Can someone help me?

Thank you,
Simone
Avatar of johnsone
johnsone
Flag of United States of America image

I found a reference to ROW_NUMBER in the documentation for 15.2, but not for 15.1, so I would think that it is there if you have a newer version.

Don't use Sybase that much, but it looks to me like those versions are end of life.  What version are you running?
Avatar of Joe Woodhouse
Joe Woodhouse

Actually could we have the product and version? There are three Sybase database products and they don’t all use the same SQL dialect.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.