Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Function
Try:
create or replace function is_number( parm in varchar2 )
return boolean
is
x number;
begin
x := to_number( parm );
return true;
exception
when value_error
then
return false;
end;
Kevin Kennedy
First Point Energy Corporation
-----Original Message-----
Sent: Thursday, July 18, 2002 9:59 AM
To: Multiple recipients of list ORACLE-L
Hi List,
Is there any way that I can check to see if the value in a variable is a number?
Example:
is_number('100') = TRUE
is_number('ABC') = FALSE
Hamid Alavi
Office 818 737-0526
Cell 818 402-1987
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Hamid Alavi
INET: hamid.alavi_at_quovadx.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jul 18 2002 - 12:55:56 CDT
![]() |
![]() |