Paging in the Advantage Database

I am creating a web application running on the Advantage database server, not my personal weapon of choice, but what the company uses. I have a few large lists that end users should be able to browse, however I cannot find a way to publish the results in SQL.

Is there something like LIMIT / OFFSET for an Advantage database? If not, any suggestions on this?

Thank you in advance!

+4
source share
3 answers

I understand that LIMIT and ROWNUM will be new features in the 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 line 50-60.

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

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

+6
source

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

 SELECT TOP 10 START AT 11 * FROM emp 

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

+2
source

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

+1
source

Source: https://habr.com/ru/post/1301683/


All Articles