|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
handle the SQL statement via passthru |
« View previous topic :: View next topic » |
Author |
Message
|
mr2kn |
Posted: Thu Oct 06, 2016 10:54 am Post subject: handle the SQL statement via passthru |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
Hi,
Im using the IIB9.0.0.4 toolkit
im having the SQL statements like
select to_char(nvl(avg(to_number(AMOUNT)),0), 'FM99,999,999') from table name
when I run the query through PASSTHRU runs fine but when at the mapping time not able to pickit up proper way to show in the xml format, and getting as response
<AVG_AMOUNT>
<TO_CHAR(NVL(AVG(TO_NUMBER(AMOUNT)),0),:V1)>2,421</TO_CHAR(NVL(AVG(TO_NUMBER(AMOUNT)),0),:V1)>
</AVG_AMOUNT>
which I don't want I need like this
<AVG_AMOUNT>2,421</AVG_AMOUNT>
so basically to_char(nvl(avg(to_number(AMOUNT)),0), 'FM99,999,999') needs to convert in normal string or any other way
Please help on this,
Thank you and much appreciated |
|
Back to top |
|
 |
eammnsh |
Posted: Sat Oct 08, 2016 3:22 am Post subject: |
|
|
Apprentice
Joined: 22 Aug 2016 Posts: 29
|
What`s the result of the PASSTHRU ? you should use a ROW type to save the outcome of a PASSTHRU |
|
Back to top |
|
 |
inMo |
Posted: Tue Oct 11, 2016 6:57 am Post subject: |
|
|
 Master
Joined: 27 Jun 2009 Posts: 216 Location: NY
|
It appears you have skipped over a good amount of info. If you'd like help, perhaps you can provide more lower level details, such as a sample of your code. |
|
Back to top |
|
 |
nelson |
Posted: Tue Oct 11, 2016 10:54 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
eammnsh wrote: |
What`s the result of the PASSTHRU ? you should use a ROW type to save the outcome of a PASSTHRU |
Something like:
Code: |
DECLARE myData ROW;
SET myData.myRow[] = PASSTHRU('select to_char(nvl(avg(to_number(AMOUNT)),0), 'FM99,999,999') myAmount from table_name' |
Then extract the info... |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|