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 check datatype of a string?

Post new topic  Reply to topic
 How to check datatype of a string? « View previous topic :: View next topic » 
Author Message
himanshubooty
PostPosted: Thu Jan 06, 2011 8:57 pm    Post subject: How to check datatype of a string? Reply with quote

Newbie

Joined: 06 Jan 2011
Posts: 2



I want to check weather a given string is a natural number (i.e. any integer greater then 0) , is there any predefined function provided in ESQL . plz help. [/b]
Back to top
View user's profile Send private message
fatherjack
PostPosted: Fri Jan 07, 2011 5:14 am    Post subject: Re: How to check datatype of a string? Reply with quote

Knight

Joined: 14 Apr 2010
Posts: 522
Location: Craggy Island

himanshubooty wrote:
I want to check weather


Try looking out the window. Is it raining? snowing? is the sun out?

But seriously

himanshubooty wrote:
is there any predefined function provided in ESQL


Don't think so, unless one got added recently. I seem to remember writing my own a while ago.
_________________
Never let the facts get in the way of a good theory.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Jan 07, 2011 5:58 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

You could use a CAST to INTEGER with a DEFAULT clause and specify -1 as the default. Then you know that if the returned value is < 0 it was not a valid integer...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
himanshubooty
PostPosted: Mon Jan 10, 2011 8:23 pm    Post subject: tnx mgk... Reply with quote

Newbie

Joined: 06 Jan 2011
Posts: 2

i wz using position function with loops, bt u made it easier tnk u
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 » How to check datatype of a string?
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.