Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Check for all numeric in a column

Re: Check for all numeric in a column

From: <Jared.Still_at_radisys.com>
Date: Fri, 31 Jan 2003 13:04:40 -0800
Message-ID: <F001.00540FDA.20030131130440@fatcity.com>


create or replace function is_number( chk_data_in varchar2 ) return boolean
is

        dummy number(38,4);
begin

        dummy := to_number(chk_data_in);
        return true;

exception
when value_error then

        return false;
when others then

        raise;
end;
/

show errors function is_number

declare

        v_test varchar2(10) := '1E';
begin

        if is_number(v_test) then
                dbms_output.put_line(v_test || ' is a number');
        else
                dbms_output.put_line(v_test || ' is NOT a number');
        end if;

end;
/

"Smith, Ron L." <rlsmith_at_kmg.com>
Sent by: root_at_fatcity.com
 01/31/2003 08:24 AM
 Please respond to ORACLE-L  

        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
        cc: 
        Subject:        Check for all numeric in a column


What is the easiest / best way to check for a valid numeric value in a column?  

R. Smith  

If you are not the intended recipient of this e-mail message, any use, distribution or copying of the message is prohibited. Please let me know immediately by return e-mail if you have received this message by mistake, then delete the e-mail message. Thank you.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Fri Jan 31 2003 - 15:04:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US