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 » SELECT statement

Post new topic  Reply to topic
 SELECT statement « View previous topic :: View next topic » 
Author Message
kalva7
PostPosted: Thu Oct 07, 2004 4:22 am    Post subject: SELECT statement Reply with quote

Novice

Joined: 18 Sep 2003
Posts: 21
Location: Pune,India

Guys,I have one XML message like this

<Invoices>

<Invoice>
<FirstName>Andrew</FirstName>
</Invoice>
<Invoice>

<Invoice>
<FirstName>smith</FirstName>
</Invoice>
<Invoice>

<Invoice>
<FirstName>Andrew</FirstName>
</Invoice>
<Invoice>

</Invoices>

Iam using the following esql statement to select specific records

SET OutputRoot.XML.Sales= (SELECT I.Invoice FROM InputRoot.XML.Invoices AS I WHERE I.Invoice.Customer.LastName = 'Andrew');
when i use the above statement iam supposed to get 2 records appended tp Sales element but iam getting only one record, that is first record.

Can you anyone tell me what the error is??
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mgk
PostPosted: Thu Oct 07, 2004 4:57 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

You forgot to specify the list operator [] on Sales, and your ESQL does not match your message. I have changed it as follows:

Code:
SET OutputRoot.XML.Sales[] = (SELECT I.Invoice FROM InputRoot.XML.Invoices AS I WHERE I.Invoice.FirstName = 'Andrew');


Cheers,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » SELECT statement
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.