× 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.



Aaron

Look at the Invocation section of that link, where it says where a statement can be used.

"This statement can only be embedded in an application program. It is not an executable statement. It must not be specified in Java?."

This means it cannot be executed in STRSQL.

HTH
Vern

-------------- Original message ----------------------
From: "Aaron Bartell" <albartell@xxxxxxxxx>
Apparently high level tooling like Hibernate are taking their toll on my
ability to write an SQL statement from scratch. Here's my issue - If I want
to use STRSQL to FETCH a relative set of records, I thought I could do the
following:



DECLARE C1 CURSOR FOR SELECT * FROM qiws/qcustcdt FETCH RELATIVE 2 FROM C1
FOR 6 ROWS



The above produces the following error: "Keyword FROM not expected. Valid
tokens: ROW ROWS."



DECLARE CURSOR syntax:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/db2/r
bafzmsth2clcu.htm



SELECT syntax:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/db2/r
bafzmstfets.htm



FETCH syntax:

http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/db2/r
bafzmstfets.htm



Thanks,

Aaron Bartell

http://mowyourlawn.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.