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 » How to convert CHAR '02' to Integer

Post new topic  Reply to topic
 How to convert CHAR '02' to Integer « View previous topic :: View next topic » 
Author Message
N
PostPosted: Sun Feb 24, 2008 5:52 pm    Post subject: How to convert CHAR '02' to Integer Reply with quote

Acolyte

Joined: 21 Jul 2007
Posts: 64

Hi,

Any1 have tried to convert CHAR '02' to INT 2?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 25, 2008 1:21 am    Post subject: Re: How to convert CHAR '02' to Integer Reply with quote

Grand High Poobah

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

N wrote:
Any1 have tried to convert CHAR '02' to INT 2?


Yes thanks!

What method did you try? I'm saying try, because I doubt you'd have posted if it worked.

Of course, if you're just judging support for a "we successfully converted char to int club" I apologise.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
N
PostPosted: Mon Feb 25, 2008 10:18 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Jul 2007
Posts: 64

Hi,

Thanks for your reply. I got it works before i post. However im jz wondering is there any better solution?

DECLARE X CHAR;
SET X='02';

DECLARE Y INTEGER;
SET Y = CAST(X AS INTEGER); -- Print 2
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Feb 26, 2008 2:12 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

N wrote:
Hi,

Thanks for your reply. I got it works before i post. However im jz wondering is there any better solution?

DECLARE X CHAR;
SET X='02';

DECLARE Y INTEGER;
SET Y = CAST(X AS INTEGER); -- Print 2


better solution in terms of ??

this is the simplest and most perfomant possible solution...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to convert CHAR '02' to Integer
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.