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 » ESQL problem

Post new topic  Reply to topic
 ESQL problem « View previous topic :: View next topic » 
Author Message
mqram
PostPosted: Mon Feb 02, 2004 3:23 am    Post subject: ESQL problem Reply with quote

Novice

Joined: 11 Sep 2002
Posts: 20
Location: chennai

I have two varaiables in Character type. Its having some decimal values. I want to add the two values and store into decimal varaiable.

For example

A is Char its having 23.98
B is Char its having 78.65

T is Decimal

T = A + B

How can achive this through ESQL
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Michael Dag
PostPosted: Mon Feb 02, 2004 3:39 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

the manual probably lists a number of examples, lookup functions to convert from CHAR to INT.

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
EgilsJ.Rubenis
PostPosted: Mon Feb 02, 2004 5:27 am    Post subject: Reply with quote

Acolyte

Joined: 18 Nov 2002
Posts: 63
Location: Germany, Alfeld

Hi,

your esql should look like this:

declare tmp_value_1 character;
declare tmp_value_2 character;

declare tmp_value_dec_1 decimal;
declare tmp_value_dec_2 decimal;

declare tmp_total decimal;

set tmp_value_1 = '25.47';
set tmp_value_2 = '10.00';

set tmp_value_dec_1 = cast(tmp_value_1 as decimal);
set tmp_value_dec_2 = cast(tmp_value_2 as decimal);

set tmp_total = tmp_value_dec_1 + tmp_value_dec_2;

SET "OutputRoot"."XML"."Temp_VALUE" = tmp_total;

thde result in the message is:

(0x1000010)XML = (
(0x1000000)Temp_VALUE = (
(0x2000000) = 035.47
)

cheers, Egils
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL problem
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.