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 IndexWebSphere Message Broker SupportESQL XML SELECT not functioning

Post new topicReply to topic
ESQL XML SELECT not functioning View previous topic :: View next topic
Author Message
dhausler
PostPosted: Tue Jan 09, 2018 11:58 pm Post subject: ESQL XML SELECT not functioning Reply with quote

Newbie

Joined: 09 Jan 2018
Posts: 1

I have incoming XML that may or may not contain 2 address attributes. I need to select only one of them based on attribute they contain. This is the XML:

Code:
 <ClientAddress>
                  <AddressId>yyy</AddressId>
                  <City>Jesenice - Zdiměřice</City>
                  <Country>CZE</Country>
                  <Street>Sokol</Street>
                  <StreetNumber>139</StreetNumber>
                  <Zip>25242</Zip>
                  <AddressType>Dom</AddressType>
                  <County/>
               </ClientAddress>
               <ClientAddress>
                  <AddressId>xxx</AddressId>
                  <City>Jesenice - Zdiměřice</City>
                  <Country>CZE</Country>
                  <Street>Sokol</Street>
                  <StreetNumber>139</StreetNumber>
                  <Zip>25242</Zip>
                  <AddressType>Com</AddressType>
               </ClientAddress>


Now I need to select the addres with AddressType='Dom'. To do so, I have this ESQL
DECLARE result ROW;

SET result.address[] = SELECT a.AddressId, a.City, a.Country, a.Street, a.StreetNumber, a.Zip, a.AddressType
FROM CRM.crm:ClientAdresses.crm:ClientAddress[]
AS a
WHERE CRM.crm:ClientAdresses.crm:ClientAddress.crm:AddressType = 'Dom';

Unfortanetly, it doesnt fill the result variable completley. I do see 2 address variables in the result, however they are not populateed with results. Is there something obvious I'm missing?
I'm on IIB 10.0.0.6
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 10, 2018 5:51 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19677
Location: LI,NY

Your query shows namespaces (crm). Your XML does not.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportESQL XML SELECT not functioning
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.