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 » ESQL: testing for existance in multiple dimensional xml tree

Post new topic  Reply to topic
 ESQL: testing for existance in multiple dimensional xml tree « View previous topic :: View next topic » 
Author Message
duffMan
PostPosted: Mon Jan 19, 2009 8:49 am    Post subject: ESQL: testing for existance in multiple dimensional xml tree Reply with quote

Voyager

Joined: 03 Jun 2002
Posts: 75

I have a multidimension repeating structure like;

Code:

A
  B
    C = 1
    C = 2
    C = 9
    C = 4
A
  B
    C = 9
    C = 16
A
  B
    C = 2

I want to use a single SELECT statement to test for value of C. (or some other mechanism not involving a CODED nested loop)

In the example above if I test for C=2 I will return TRUE. If I test for C=16 I will return TRUE. If I test for C=7 I return FALSE.

The following SELECT statement isn't valid, but hopefully it gets to point across.

SELECT TRUE
FROM A[].B[] AS T1
WHERE T1.C[] = 2;

Or is there some other wildcard capabilities for arrays that I cannot find?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jan 19, 2009 3:17 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have you read this?: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ak05820_.htm
Back to top
View user's profile Send private message
duffMan
PostPosted: Mon Jan 19, 2009 8:55 pm    Post subject: Reply with quote

Voyager

Joined: 03 Jun 2002
Posts: 75

not sure that will work as the the 2nd "table" in the join is nested in the 1st and must contain a reference to the parent. I cannot acheive a cartesian product.

Code:

i.e.  select blah
          from root.xmlnsc.a[], root.xmlnsc.a[?].b[] as T
         where T.c = 2;


I need to specify a value for ?. so if i specify say "1" then it'll join a[1].b[] to all the a[]'s. If that makes sense.

anyway I think I go with traversing the tree. that's likely what the Select produces (under the covers) anyway.

thanks.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jan 20, 2009 12:41 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

I believe that nested SELECTs may work, one for all outer A's, one for all B's within each A, and then one for each C within each B.

Regards,
_________________
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 » ESQL: testing for existance in multiple dimensional xml tree
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.