certainly not as a single statement...

Declare;
Open;
Fetch;
Close;


Aaron Bartell wrote:
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 ...

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.