Question

i'm creating a web app that's running on an Advantage Database server, not my personal weapon of choice but that's what the company uses. I have a couple of big lists that the end-users need to be able to view however i can't seem to find a way to page through the results in SQL.

Is there something like LIMIT / OFFSET for Advantage Database? If no, any suggestions on approaching this?

thank you in advance!

Was it helpful?

Solution

I understand that LIMIT and a ROWNUM will be new features in an upcoming version of Advantage. http://feedback.advantagedatabase.com/forums/2671-general/suggestions/30213-return-query-specific-row-number-?ref=title

However, until then, I have used this in the past to select row 50-60.

select top 10 * from mytable where rowid not in (select top 50 rowid from mytable)

@tommieb75, you indicated that the SQL dialect was not standard. I have found that it is based on the standards containing most of the SQL-92 standard and some of the SQL-2003 features.

OTHER TIPS

Updating this for any stumbling here, but as Edgar mentioned in his answer, Advantage 10 SQL now supports a START AT keyword.

SELECT TOP 10 START AT 11 * FROM emp

See: devzone.advantagedatabase.com/dz/webhelp/Advantage10.1/master_limiting_query_results.htm

According to this, the correct syntax for LIMIT in Advantage is SELECT TOP 10 * FROM YOURTABLE.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top