Author |
Message
|
samchenchu |
Posted: Tue Aug 20, 2013 4:57 am Post subject: Stored procedure result set merging in ESQL |
|
|
Novice
Joined: 13 Aug 2013 Posts: 22
|
hi friends,
My stored procedure is retrieving the multiple resultsets and I want to merge the those into single xml. Can anyone please suggest me how to implement this scenario.javascript:emoticon(' ') |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 20, 2013 5:01 am Post subject: Re: Stored procedure result set merging in ESQL |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
samchenchu wrote: |
Can anyone please suggest me how to implement this scenario. |
By writing ESQL?
Seriously, what are you asking? What's the problem? What you've described is mapping the contents of a result set onto a message tree. There have to be a dozen ways to do that, and the "best" one varies.
What have you tried? Why didn't you think that was successful? Why are you posting here?
Better information, better advice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
samchenchu |
Posted: Tue Aug 20, 2013 8:23 am Post subject: |
|
|
Novice
Joined: 13 Aug 2013 Posts: 22
|
I have taken the stored procedure output into environment and below is the result in debug mode.now can you tell me how to take concatinate this 2 resultsets message into one xml.
WMQI_Environment
XMLNSC
ResultSet
XML_F52E2B61-18A1-11d1-B105-00805F49916B:CHARACTER:<ItemDepotRequest ItemNumber="124103" DepotNo="0" Itemtype="33" RequestedCases="11" XPercentageAvailableBOH="0.00" IsGPF="0" ValidationStatus=""/><ItemDepotRequest ItemNumber="135100" DepotNo="0" Itemtype="33" RequestedCases="7" XPercentageAvailableBOH="0.00" IsGPF="0" ValidationStatus=""/><ItemDepotRequest ItemNumber="148057" DepotNo="7491" Itemtype="20" RequestedCases="2055" XPercentageAvailableBOH="205.36" IsGPF="0"
ResultSet
XML_F52E2B61-18A1-11d1-B105-00805F49916B:CHARACTER:ValidationStatus=""/> |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 20, 2013 8:43 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 20, 2013 9:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
samchenchu wrote: |
I have taken the stored procedure output into environment and below is the result in debug mode. |
You're much better using Trace nodes for this.
samchenchu wrote: |
now can you tell me how to take concatinate this 2 resultsets message into one xml. |
One at a time. Seriously. It's that simple. I don't understand what you're asking. You've got 2 tags called ResultSet and you want the contents in 1 outbound XML. Welcome to WMB; we have this thing called ESQL which you've clearly discovered and used to load the Environment. What goes wrong after that?
See my comments above, especially how better information leads to better advice & mentioing at some point in your post what you've tried _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
samchenchu |
Posted: Tue Aug 20, 2013 9:16 pm Post subject: |
|
|
Novice
Joined: 13 Aug 2013 Posts: 22
|
Hi,
How to concatinate two references?I am doing SET ConcatRef = TotEnvRef || ConcatRef; which is not working.Can anyone help me? |
|
Back to top |
|
 |
samchenchu |
Posted: Tue Aug 20, 2013 9:28 pm Post subject: |
|
|
Novice
Joined: 13 Aug 2013 Posts: 22
|
i am using below code to check the null value.
SET ConcatRef = COALESCE(TotEnvRef,'') || COALESCE(ConcatRef,'');
this statement is present in while loop and for the 2nd iteration the concatination is not happening,instead It is overwriting the value of 'ConcatRef'. javascript:emoticon(' ') |
|
Back to top |
|
 |
samchenchu |
Posted: Tue Aug 20, 2013 9:38 pm Post subject: |
|
|
Novice
Joined: 13 Aug 2013 Posts: 22
|
It is working..thank you... |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 21, 2013 5:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
samchenchu wrote: |
It is working..thank you... |
Well done.
Care to post your solution for the benefit of future readers? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|