ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JOIN IN ESQL

Post new topic  Reply to topic
 JOIN IN ESQL « View previous topic :: View next topic » 
Author Message
tosaurav
PostPosted: Thu Mar 01, 2007 10:03 am    Post subject: JOIN IN ESQL Reply with quote

Acolyte

Joined: 16 Jan 2007
Posts: 62

I want to run SELECT query from compute node to Oracle database.Query has outer join.Want to know how to write in esql.

Query is
SELECT B.ITEM, nvl(B.ITEMDESCEN, ''), nvl(A.Qty, '2'), nvl(A.InvoiceNo, ''), nvl(A.InvoiceText, '') FROM Database.Invoice AS A, Database.Item AS B WHERE B.itemKey = A.Invoice_Item_key(+)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 01, 2007 10:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can select from more than one datasource or message tree.

select a.*, b.* from Database.MYDB as a, InputRoot.XMLNS as B;
select a.*, b.* from Database.MYDB as a, Database.MYDB2 as B;
select a.*, b.* from InputRoot.XMLNS as b, Environment.Variables.OldMessageTree.XMLNS as b;

There are some rules about whether you have to select from message trees first or databases first when you are mixing the two.

But of course, you've already seen that in the documentation.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tosaurav
PostPosted: Thu Mar 01, 2007 10:16 am    Post subject: Reply with quote

Acolyte

Joined: 16 Jan 2007
Posts: 62

But my concern is join and nvl function.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 01, 2007 10:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05620_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
au@kosa
PostPosted: Thu Mar 01, 2007 10:19 pm    Post subject: Reply with quote

Centurion

Joined: 04 Jan 2007
Posts: 103
Location: pune

Try to run the query using PASSTHRU function

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ad09275_.htm
_________________
Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate
Back to top
View user's profile Send private message Yahoo Messenger
au@kosa
PostPosted: Thu Mar 01, 2007 10:34 pm    Post subject: Reply with quote

Centurion

Joined: 04 Jan 2007
Posts: 103
Location: pune

you can use 'COALESCE function' in ESQL as an alternative of NVL in Oracle query
_________________
Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JOIN IN ESQL
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.