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 » Strange problems in select statement

Post new topic  Reply to topic
 Strange problems in select statement « View previous topic :: View next topic » 
Author Message
rajaram
PostPosted: Thu Mar 25, 2004 4:21 am    Post subject: Strange problems in select statement Reply with quote

Acolyte

Joined: 02 Jan 2004
Posts: 53

Hi,
I have never seen such a problem in my life.

Problem 1:
If i parse XML message in MRM Domain i cannot access attributes of XML elements in compute node .I have to use '@', before attribute.This works fine.
eg:For XML data
<level1>
<level2 id='123'></level>
</level1>

if i refer to 'id' as "level1"."level2"."@id" in ESQL....it works perfectly.....But this is not the case with all attributes. . I have to check in debugger or in trace node to really check if th attribute is preceded b "@".Only then i can use "@"...else without '@' itr works fine.....

Problem2:

declare T as Environment.Variables.FlowSpecific."class"[];

SET temp = THE(SELECT ITEM R."avText"."value" FROM T."at"[] as R WHERE R."@id" = '437');


This statement works fine as long as "437" anywhere in first <class>.

eg:
<class id="1">
<desc>Physical</desc>
<at id="114">
<desc>PACKAGING TYPE</desc>
<avText id="2028401">
<value>fghfgh</value>
</avText>
</at>
<at id="437">
<desc>vbcbvcvbcb</desc> <avText id="4948">
<value>1 COLOUR</value>
</avText>
</at>
<at id="949">
<desc>PRODUCT WIDTH - MM (GDD)</desc>
<avText id="10545">
<value>49.000</value>
</avText>
</at>
<at id="950">
<desc>PRODUCT DEPTH - MM (GDD)</desc>
<avText id="10653">
<value>49.000</value>
</avText>
</at>
</class>
<class id="2">
<at id="951">
<desc>PRODUCT WIDTH - MM (GDD)</desc>
<avText id="10545">
<value>49.000</value>
</avText>
</at>
<at id="952">
<desc>PRODUCT DEPTH - MM (GDD)</desc>
<avText id="10653">
<value>49.000</value>
</avText>
</at>
</class>



BUT
if i use
declare T as Environment.Variables.FlowSpecific."class"[1].at[];

SET temp = THE(SELECT ITEM T."avText"."value" FROM T WHERE T."@id" = '437');

This will not work..
i.e.Now this will just search at[1]...(first at[]) in class[1].

Can anyone please explain me these two behaviour of SELECT Statement????
Thanks in advance[/i]
Back to top
View user's profile Send private message
wooda
PostPosted: Tue Mar 30, 2004 7:16 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Hi rajaram -
Quote:
Problem 1:
If i parse XML message in MRM Domain i cannot access attributes of XML elements in compute node .I have to use '@', before attribute.This works fine.
eg:For XML data
<level1>
<level2 id='123'></level>
</level1>

if i refer to 'id' as "level1"."level2"."@id" in ESQL....it works perfectly.....But this is not the case with all attributes. . I have to check in debugger or in trace node to really check if th attribute is preceded b "@".Only then i can use "@"...else without '@' itr works fine.....


If the MRM finds a self defined attribute (ie one which it cannot match to your message set) it will be appended with an @ when written to the tree.
So the reason you are sometimes seeing the @ and sometimes not is because sometimes the attributes matches your model and sometimes it is self-defined. So if this attribute is defined i nthe message set then your message is not matching the message set.
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 » Strange problems in 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.