View previous topic :: View next topic
|
Author |
Message |
renjithravi
New User
Joined: 28 Jul 2008 Posts: 14 Location: Chennai
|
|
|
|
Hi,
I have a field declared as char(25). But it will will be filled with only numbers from 0 to 9. I want to check whether this field contains only zeroes and do some procesing. How to do this check?
Thanks and regards
Renjith |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
renjith,
Quote: |
I have a field declared as char(25). But it will will be filled with only numbers from 0 to 9. |
Will all the 25 bytes be filled with numerals? If yes, you can first use IS NUMERIC and then check the field for zeroes and process accordingly. |
|
Back to top |
|
|
renjithravi
New User
Joined: 28 Jul 2008 Posts: 14 Location: Chennai
|
|
|
|
yes all the 25 bytes will be filled with numerals..i can check whether the field is numeric but how to check for zeros?
should i have to hardcode IF A = 25ZEROES or u have any other option like
IF A IS ZEROES? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
IF A = ALL '0' |
|
Back to top |
|
|
|