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: Conversion of a varchar2 to a number

RE: Conversion of a varchar2 to a number

From: Cale, Rick T (Richard) <RICHARD.T.CALE_at_saic.com>
Date: Wed, 13 Dec 2000 12:56:49 -0800
Message-Id: <10709.124492@fatcity.com>


You could parse the the field using character functions then do a to_number.

Rick

> -----Original Message-----
> From: David Turner [SMTP:turner_at_elvis.mu.org]
> Sent: Wednesday, December 13, 2000 1:46 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Conversion of a varchar2 to a number
>
> I have a user that has a phone number field that is stored as
> a varchar2 and some of the data actually has letters in it. When
> he tries to do a TO_NUMBER it fails of course on the records that
> have letters in them.
>
> To perform the conversion I thought using a cursor and handling the
> exceptions would work, but wanted to see if other people had a better
> way of doing this.
>
> Thanks, Dave Turner
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: David Turner
> INET: turner_at_elvis.mu.org
>
> 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 Wed Dec 13 2000 - 14:56:49 CST

Original text of this message

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