'Sybase search result with offset

I am working on Sybase. Want to implement pagination for a result. I can get first few records by stating set rowcount 100 But is there any way to set start point as well. The result is ordered on basis of a text value.

I tried finding at stackoverflow as well as in Sybase documentations, but could not find the way. I tried Limit, rownum() etc. but they are not supported. Also tried putting it as inner query, but somehow it is not working.

One solution I found which was of creating temp table with identity and get the same. But to the application, I do not have create table permission.

Can someone please help me in this?



Solution 1:[1]

You should use START AT. Try:

SELECT TOP 25 START AT 50 * FROM TABLE1 ORDER BY Id

Solution 2:[2]

LIMIT and OFFSET are supported in ASE 16, see https://help.sap.com/viewer/cbed2190ee2d4486b0bbe0e75bf4b636/16.0.3.7/en-US/c1881eb182ee4b899f54c577d9dc0ecb.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 henginy
Solution 2 i000174