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 » THE function

Post new topic  Reply to topic
 THE function « View previous topic :: View next topic » 
Author Message
rajesh.mbmq
PostPosted: Sun Aug 24, 2014 11:04 am    Post subject: THE function Reply with quote

Newbie

Joined: 08 Aug 2014
Posts: 1

my xml structure is

<EMP>
<EMPNO>124</EMPNO>
<EMPNO>120</EMPNO>
<EMPNAME>john</EMPNAME>
<EADD>
<ADD>123</ADD>
<ADD>126</ADD>
</EADD>
</EMP>
I was trying to fecth first value in EADD element by using THE function .

SET OutputRoot.XMLNSC.EMP.EMPNO =THE(SELECT * FROM InputRoot.XMLNSC.EMP.EADD AS P);

output is coming as
<EMPNO>
<ADD>123</ADD>
<ADD>126</ADD>
</EMPNO>

If we use THE function only first value will come as below ,but it iis not coming
<EMPNO>
<ADD>123</ADD>
</EMPNO>
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 25, 2014 4:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You're getting the very first element named 'EADD', which happens to have children.

This is what your code is asking for.

You appear to be wanting the first child of the first element named 'EADD'.

This is not what your code is asking for.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » THE function
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.