cancel
Showing results for 
Search instead for 
Did you mean: 

Limit offset

Former Member
0 Kudos

Hello,

I am trying to fetch rows from MaxDB with limit and offset. However, I cannot use the offset syntax found at http://help.sap.com/saphelp_erp60_sp/helpdata/de/40/1312152fa511d3a98100a0c9449261/content.htm.

I am able to fetch e.g. result 1 to 15 by using "limit 15", but if I try to get result 15 to 30 by using "limit 15,15" i get the following error:

"Error Executing 'Processing result rows' SAP DBTech JDBC: [-7085]: Function not allowed for this cursor.[-7085]: Function not allowed for this cursor"

Could my SQL syntax contain errors, or does MaxDB not support the use of offset with the limit clause?

My MaxDB Version is 7.6.06.03.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

the LIMIT clause with offset works only with 'forward only cursor'.

To switch to forward only cursor in Databbase Studio select

Windows->Preferences->Database Studio->Query Results

and enable the "Use forward only result cursor" Checkbox.

Kind regards,

B*

Former Member
0 Kudos

Hi Burkhard,

Thank you for helping me once again, you help is always much appreciated.

unfortunately i was misunderstood.

I am asking about Limit with offfset in SQL statment, since i am selecting huge Data for the website, i would like to trancute it into parts which makes the results faster for the website.

thanks alot

regards

Former Member
0 Kudos

Hi,
the error message you have posted comes from JDBC or Database Studio so I guess you have change the Interface 😉

I am sorry the cursor modeI in MaxDB PHP is always SCROLL_SENSITIVE. 


We need scrollable cursor for PHP data_seek function. Try it with data_seek and pass the offset.

Regards,

B*

Former Member
0 Kudos

Hi Burkhard,

unfortunately this Data_seek is only like a pointer, but the result were already in bulk selected, and our Gaol is to get the result themself in steps and not all at once

is there no other function in MaxDB? no limit 10,10 ...etc.

thank you very much

regards,

Former Member
0 Kudos

any Help please? thanks alot