Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql - phone numbers
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
--
"Some days you're the pigeon, and some days you're the statue." Received on Thu Oct 14 1999 - 06:28:41 CDT