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

Home -> Community -> Usenet -> c.d.o.server -> Re: sql - phone numbers

Re: sql - phone numbers

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 14 Oct 1999 19:28:41 +0800
Message-ID: <3805BE69.66F8@yahoo.com>


Gregory Caulton wrote:
>
> If I have a column with phone numbers in a variety of formats
> e.g. 555-555 5555
> (555)555-5555
> 5555555555
> and what it to insert into a column that is numeric i.e. I need to
> change all of them to a number, what is the best way, I seem to get
> 'invalid number' often when trying to mix to_number, translate and nvl
> together into my insert.
>
> thanks!
>
> Greg

select replace(replace(replace(col,'-',null), ')', null), ')',null) from xxx

is a clunky way
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Oct 14 1999 - 06:28:41 CDT

Original text of this message

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