|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
is FETCH supported in ESQL for the SELECT against DB2 |
« View previous topic :: View next topic » |
Author |
Message
|
sknrt1 |
Posted: Wed Oct 18, 2006 6:56 am Post subject: is FETCH supported in ESQL for the SELECT against DB2 |
|
|
Apprentice
Joined: 22 Jan 2003 Posts: 39 Location: USA
|
Broker Version: WMB v6
I have a req to get only First few records of the SELECT Query from DB2.
SELECT with FETCH works in DB2, but not from ESQL, so is FETCH supported as in SQL?
e.g:
SELECT * from table FETCH FIRST 100 ROWS ONLY;
works in database.
but the same statement doesn't work in ESQL, toolkit compile fails when FETCH is included in SELECT statement. Are there any other approaches to do it the ESQL itself, than having it as an external Stored Procedure or so...
Thanks in Advance |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 18, 2006 7:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
Yaroslav |
Posted: Wed Oct 18, 2006 9:58 am Post subject: |
|
|
Novice
Joined: 28 Sep 2006 Posts: 12 Location: Russia
|
Hi, sknrt1!
It's no structure like "FETCH FIRST N ROWS ONLY" in ESQL SELECT statement.
If you want to get the same effect you can use
PASSTHRU(<Database specific SQL>)
or
Create DB2 stored procedure which return result set based on your
select statement and declare this SP as EXTERNAL PROCEDURE in ESQL. _________________ IBM Certified Solution Designer WebSphere MQ V6.0
IBM Certified Solution Developer WebSphere Message Broker V6.0 |
|
Back to top |
|
 |
sknrt1 |
Posted: Wed Nov 15, 2006 7:24 am Post subject: |
|
|
Apprentice
Joined: 22 Jan 2003 Posts: 39 Location: USA
|
FETCH works, initially i had a wrong query.
Any way thanks a lot for the info. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|