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 » handle the SQL statement via passthru

Post new topic  Reply to topic
 handle the SQL statement via passthru « View previous topic :: View next topic » 
Author Message
mr2kn
PostPosted: Thu Oct 06, 2016 10:54 am    Post subject: handle the SQL statement via passthru Reply with quote

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
View user's profile Send private message
eammnsh
PostPosted: Sat Oct 08, 2016 3:22 am    Post subject: Reply with quote

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
View user's profile Send private message
inMo
PostPosted: Tue Oct 11, 2016 6:57 am    Post subject: Reply with quote

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
View user's profile Send private message
nelson
PostPosted: Tue Oct 11, 2016 10:54 am    Post subject: Reply with quote

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
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 » handle the SQL statement via passthru
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.