× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How are you trying to run the statement? You mention iNav's (run SQL
scripts?)...

But you can't use OFFSET in a statement in Run SQL Scripts.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/db2/rbafzoffset.htm
"The *offset-clause* is only allowed as part of the outer fullselect of a
DECLARE CURSOR statement or a prepared *select-statement*. It is not
supported in interactive SQL."

You also mention using prepare, so it seems you're aware of the limit. Are
you attempting to create a stored procedure from Run SQL Scripts, or are
you attempting to create a prepared statement directly in Run SQL Scripts;
which is not supported.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/db2/rbafzactallow.htm

Charles


On Mon, Mar 7, 2016 at 10:40 AM, Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

can you show your code?

On Mon, Mar 7, 2016 at 10:33 AM, Brian <belstsrv@xxxxxxxxx> wrote:

Hi All,

I am working on an application to pass records to a web application. I
located information on using LIMIT and OFFSET in SQL but then learned we
didn't have 7.1 TR11 installed. That was installed this weekend during
maintenance and I believe I confirmed this by doing:

DSPPTF 5770999

I can then page down and see this PTF ID says it was permanently applied:
MF99011

I believe that confirms it was applied.

But, when trying to use either LIMIT or OFFSET in my program, it fails on
the PREPARE statement. Thinking maybe I had some issue in the code, I
tried using System i Navigator (old program, not web version) to run the
SQL statements as I'd read you can use those options there but not in
STRSQL. But, when trying to use them there, I still get an invalid token
error.

I am not sure what to do next to try and troubleshoot this.

Any advice would be awesome.

Thanks!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.