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 » convert a string variable having decimalvalue to int in esql

Post new topic  Reply to topic
 convert a string variable having decimalvalue to int in esql « View previous topic :: View next topic » 
Author Message
kumar.shanj
PostPosted: Wed Dec 29, 2010 10:48 am    Post subject: convert a string variable having decimalvalue to int in esql Reply with quote

Apprentice

Joined: 18 Nov 2010
Posts: 49

I want to to convert a string variable having decimal value to int.
I am retrieving a decimal value from database and i have to set the integer part of it to a string variable in esql ,Message broker
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 29, 2010 10:50 am    Post subject: Re: convert a string variable having decimalvalue to int in Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kumar.shanj wrote:
I want to to convert a string variable having decimal value to int.
I am retrieving a decimal value from database and i have to set the integer part of it to a string variable in esql ,Message broker


Thank you for sharing. Was there a question?

There's nothing intrinsically difficult in doing what you outline above in ESQL. One of your earlier posts displayed a knowledge of this, so I assume you've tried it & it's not working.

A few clues would help us advise you. Like the code you're using & the error (or unexpected result) you're getting??
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kumar.shanj
PostPosted: Thu Dec 30, 2010 8:00 am    Post subject: Reply with quote

Apprentice

Joined: 18 Nov 2010
Posts: 49

Thnks for reply...

Its working now.


SET targetDecimal = CAST(SourceString AS DECIMAL);
SET targetInteger = CAST(targetDecimal AS INTEGER);
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 » convert a string variable having decimalvalue to int in esql
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.