Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Is there any way of paginate SQL Query in Caché?

Question
Andrei Luiz Nenevê · Feb 24, 2017

Is there any way of paginate SQL Query in Caché?

Hi,

My doubt is about the SQL Query in Caché:

I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.

So, how can I do this, without losing performance, there is any way?

NOTE: In other SQL languages I can do, for example, SELECT * FROM extbl Limit 10 OFFSET 10

Thanks,

Andrei L. Nenevê

#Caché #ObjectScript #SQL

Source URL:https://community.intersystems.com/post/there-any-way-paginate-sql-query-cach%C3%A9