Advantage 数据库中的分页
我正在创建一个在 Advantage 数据库服务器上运行的 Web 应用程序,这不是我个人选择的武器,但这是公司使用的武器。 我有几个最终用户需要能够查看的大列表,但是我似乎找不到在 SQL 中对结果进行分页的方法。
Advantage 数据库有类似 LIMIT / OFFSET 的东西吗?如果没有,有什么建议可以解决这个问题吗?
先感谢您!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
据我了解,LIMIT 和 ROWNUM 将成为即将推出的 Advantage 版本中的新功能。
http:// Feedback.advantagedatabase.com/forums/2671-general/suggestions/30213-return-query-specific-row-number-?ref=title
但是,在那之前,我过去曾使用它来选择第 50 行-60。
从 mytable 中选择前 10 个 *
where rowid not in (select top 50 rowid from mytable)
@tommieb75,您表明 SQL 方言不是标准的。我发现它基于包含大部分 SQL-92 标准和一些 SQL-2003 功能的标准。
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.
更新此内容以防止此处出现任何问题,但正如 Edgar 在他的回答中提到的那样,Advantage 10 SQL 现在支持
START AT
关键字。请参阅:devzone.advantagedatabase.com/dz/webhelp/Advantage10.1/master_limiting_query_results .htm
Updating this for any stumbling here, but as Edgar mentioned in his answer, Advantage 10 SQL now supports a
START AT
keyword.See: devzone.advantagedatabase.com/dz/webhelp/Advantage10.1/master_limiting_query_results.htm
根据 this,
LIMIT 的正确语法Advantage 中的
是SELECT TOP 10 * FROM YOURTABLE
。According to this, the correct syntax for
LIMIT
in Advantage isSELECT TOP 10 * FROM YOURTABLE
.