Author |
Message
|
wischlei |
Posted: Wed Oct 25, 2006 7:36 am Post subject: WBIMB 5.0: Select to join ListItems from two different Lists |
|
|
Novice
Joined: 11 Feb 2004 Posts: 21 Location: Germany
|
I have got two different inputs with ListItem entries which I want to copy to a new XML tree:
(<somenodes > are actually identical, I just numbered them to show the source in the Target tree)
<RootA>
<List>
<ListItem><somenodes1/></ListItem>
<ListItem><somenodes2/></ListItem>
<ListItem><somenodes3/></ListItem>
<ListItem><somenodes4/></ListItem>
</List>
<List>
<ListItem><somenodes5/></ListItem>
<ListItem><somenodes6/></ListItem>
<ListItem><somenodes7/></ListItem>
</List>
<List>
<ListItem><somenodes8/></ListItem>
<ListItem><somenodes9/></ListItem>
<ListItem><somenodes10/></ListItem>
<ListItem><somenodes11/></ListItem>
<ListItem><somenodes12/></ListItem>
</List>
</RootA>
<RootB>
<SomeElem>
<List>
<ListItem><somenodes13/></ListItem>
<ListItem><somenodes14/></ListItem>
<ListItem><somenodes15/></ListItem>
<ListItem><somenodes16/></ListItem>
</List>
</SomeElem>
<RootB>
Needed Result (not necessarily sorted):
<RootC>
<SomeElemC>
<List>
<ListItem><somenodes1/></ListItem>
<ListItem><somenodes2/></ListItem>
<ListItem><somenodes3/></ListItem>
<ListItem><somenodes4/></ListItem>
<ListItem><somenodes5/></ListItem>
<ListItem><somenodes6/></ListItem>
<ListItem><somenodes7/></ListItem>
<ListItem><somenodes8/></ListItem>
<ListItem><somenodes9/></ListItem>
<ListItem><somenodes10/></ListItem>
<ListItem><somenodes11/></ListItem>
<ListItem><somenodes12/></ListItem>
<ListItem><somenodes13/></ListItem>
<ListItem><somenodes14/></ListItem>
<ListItem><somenodes15/></ListItem>
<ListItem><somenodes16/></ListItem>
</List>
</SomeElemC>
</RootC>
Is there any way to do this with a single select statement like
SET RootC.SomeElemC.List.*[] = (select A.LogItem,
B.LogItem
From RootA.List[],
RootB.List);
(I know that this one does not work as I tried it in my first naive attempt). _________________ Winfried Schleipen |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 25, 2006 7:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
wischlei |
Posted: Thu Oct 26, 2006 12:31 am Post subject: |
|
|
Novice
Joined: 11 Feb 2004 Posts: 21 Location: Germany
|
Hi,
thanks a lot for posting a link to the wrong documentation (WBIMB 5.0!!!).
I can also rtfm. When I post a question in a forum I hope that there is someone out there who can help me in finding a solution in shorter time than by reading the docs and trying out different solutions.
Nevertheless I am thankful for any help so do please not mind my rudeness. _________________ Winfried Schleipen |
|
Back to top |
|
 |
AMuck |
Posted: Thu Oct 26, 2006 1:20 am Post subject: |
|
|
Newbie
Joined: 09 Dec 2003 Posts: 3
|
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Oct 26, 2006 1:24 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi wischlei,
wischlei wrote: |
When I post a question in a forum I hope that there is someone out there who can help me in finding a solution in shorter time than by reading the docs and trying out different solutions. |
If you really wanted to save time, then you should have searched this forum, you would have found a lot of snippets.
wischlei wrote: |
Nevertheless I am thankful for any help so do please not mind my rudeness. |
Please do not mind our rudeness, we would rather want you to learn it by yourself, rather than depending on us even in the future..."something you learn on your own is something that you'll never lose on the way"...
Search this forum or look at the ESQL.pdf (available in the IBM site)...best of luck.
Regards. |
|
Back to top |
|
 |
wischlei |
Posted: Thu Oct 26, 2006 1:51 am Post subject: |
|
|
Novice
Joined: 11 Feb 2004 Posts: 21 Location: Germany
|
Hi
why do you always think that all people are totally stupid. Of course have I searched the forum. I could not find any item that solved my problem. I would not have posted a new request if I could find an snippet with the solution to my problem. I know that you guys have also better things to do than solving the same problem over and again.
Regards Winfried. _________________ Winfried Schleipen |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 26, 2006 2:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Your question is a basic question on SYNTAX. Your original snippet was close.
Here is the v5 documentation.
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.etools.mft.fp8.doc/ak05620_.htm
Notice in particular that it says
Quote: |
The FROM clause can contain multiple database references, multiple message references, or a mixture of the two. |
We only know what you actually tell us. Just like you only know what we actually tell you! Has anyone here posted "We think you're stupid"?
If you post a basic question, and don't tell us that you searched for other answers, and don't tell us that you read the documentation and don't tell us that you've received training - and we know from our own experience that any of those steps would have answered your question - what are we supposed to do? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|