|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to use JOIN when access external DB2 from WMQIv2.1 |
« View previous topic :: View next topic » |
Author |
Message
|
fnl |
Posted: Wed May 29, 2002 1:06 pm Post subject: How to use JOIN when access external DB2 from WMQIv2.1 |
|
|
Newbie
Joined: 20 Jan 2002 Posts: 6 Location: Waterloo, ON.
|
Hi,
We use WMQIv2.1.
The following SQL expression works ok on OS/390, but whe I copy it to a compute node in the flow, I got a syntax error. An red cursor appears just befor the JOIN.
SET OutputRoot.XML.BrkList[] =
(SELECT A.BRK_GRP_ID
,A.CO_CD
,A.BRK_NUM
FROM Database.DB2T9.TEB_BRK_GRP_REL AS A
JOIN Database.DB2T9.TEB_BRK_USER AS B
ON A.BRK_GRP_ID = B.BRK_GRP_ID
WHERE B.BRK_USER_ID = 'EB9');
I was wornding if ESQL allows the JOIN clause to join tables when access external DB2? I didn't find it in the ESQL Reference document.
If anybody knows how to do this, please help.
Thank you in advance!
Fanny. |
|
Back to top |
|
 |
kirani |
Posted: Wed May 29, 2002 1:39 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Fanny,
WMQI does not support JOIN clause directly. However, you can use it in a PASSTHRU statement. You can join two tables using SELECT statement as follows,
SET OutputRoot.XML.BrkList[] = (SELECT A.BRK_GRP_ID, A.CO_CD, A.BRK_NUM FROM Database.DB2T9.TEB_BRK_GRP_REL AS A,
Database.DB2T9.TEB_BRK_USER AS B
WHERE
A.BRK_GRP_ID = B.BRK_GRP_ID AND
B.BRK_USER_ID = 'EB9'); _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
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
|
|
|
|