开发者

Paging in Advantage Database

开发者 https://www.devze.com 2022-12-21 00:27 出处:网络
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'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 thi开发者_如何学编程s?

thank you in advance!


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号