Author |
Message
|
bazzaa |
Posted: Tue Sep 29, 2009 6:52 am Post subject: Using select function: is it possible to use nested queries? |
|
|
Novice
Joined: 29 Sep 2009 Posts: 18
|
Hi all,
I don't know is it a good approach to use Environment tree in this way (is it?), but anyway...
I store SOAP responses in Environment like this:
Code: |
SET Environment.ns:MySOAPCallResponse.ns:MySOAPCallResult = InputRoot.XMLNSC.ns:MySOAPCallResponse.ns:MySOAPCallResult;
|
and in another node
Code: |
SET Environment.ns:MySOAPCallResponse2.ns:MySOAPCallResult2 = InputRoot.XMLNSC.ns:MySOAPCallResponse2.ns:MySOAPCallResult2;
|
ns is declared inside Compute node. Everything is ok.
As a result, I have trees:
Tree1:
Code: |
<MySOAPCallResult>
<Item><id>1</id></Item>
<Item><id>8</id></Item>
</MySOAPCallResult>
|
and
Tree2:
Code: |
<MySOAPCallResult2>
<Item><id>1</id></Item>
<Item><id>6</id></Item>
</MySOAPCallResult2>
|
Next I have to select items from Tree 1 which aren't present in Tree 2 (it is item with id=8 in our case).
Question is is it possible to perform ESQL select without iteration over tree 1 using WHILE? Does ESQL support nested queries?
Thanks! |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 29, 2009 10:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What does the documentation on ESQL say?
Does it include a function to do what you want?
What does the documentation on that function say?
What have you found in searching this forum for other, similar, questions? |
|
Back to top |
|
 |
dk27 |
Posted: Tue Sep 29, 2009 11:10 am Post subject: |
|
|
Acolyte
Joined: 28 Apr 2008 Posts: 51
|
I would use xpath functions in this case |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 29, 2009 11:33 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
dk27 wrote: |
I would use xpath functions in this case |
Why?
What does the documentation say that makes XPATH functions a better choice here, particularly with ESQL? |
|
Back to top |
|
 |
mgk |
Posted: Tue Sep 29, 2009 11:57 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
Question is is it possible to perform ESQL select without iteration over tree 1 using WHILE? |
Yes
Quote: |
Does ESQL support nested queries? |
Yes
Read the docs to find out how...
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 |
|
 |
|