[DB2-L] SELECT ....... FROM application_table FETCH FIRST 1 ROWS ONLY ??

Georg Peter

[DB2-L] SELECT ....... FROM application_table FETCH FIRST 1 ROWS ONLY ??
Thanks, Chris.

Migration to DB2 Version 7 is planned for the end of this month...... ;-))

With kind regards - mit freundlichen Gruessen,
Georg
----------------------------------------------------------------------

-----Ursprüngliche Nachricht-----
Von: DB2 Data Base Discussion List [mailto:[login to unmask email] Im Auftrag
von Tee, Chris
Gesendet: Montag, 10. Januar 2005 14:05
An: [login to unmask email]
Betreff: Re: [DB2-L] SELECT ....... FROM application_table FETCH FIRST 1
ROWS ONLY ??

Georg

FETCH FIRST is valid in V7 onwards. (You'll have to upgrade!!)

Chris

-----Original Message-----
From: Peter, Georg [mailto:[login to unmask email]
Sent: Monday, January 10, 2005 12:56 PM
To: [login to unmask email]
Subject: [DB2-L] SELECT ....... FROM application_table FETCH FIRST 1
ROWS ONLY ??

Collegues,

in one of our applications we use some "non-self-written" program parts.
Today the vendor of this programm parts gives us a patch with the following
patch/statement:

SELECT col1, col2,..... FROM application_table FETCH FIRST 1 ROWS ONLY

This ends in an SQLCODE -199, ERROR: ILLEGAL USE OF KEYWORD FETCH, TOKEN
FOR WITH ORDER UNION EXCEPT QUERYNO OPTIMIZE WAS EXPECTED

Our environment is DB2 for OS/390 Version 6. Is it possible that the
statement above works in a non-390-environment, but not in the DB2 for
OS/390 Version 6 arena ?

Or is it a statement that works only in DB2 for z/OS V7 or V8 ?

Any comments, thoughts, experiences are highly appreciated. Thanks in
advance.

With kind regards - mit freundlichen Gruessen,
Georg

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm