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

Home -> Community -> Usenet -> c.d.o.misc -> Re: basic sql help please

Re: basic sql help please

From: Deuce <rick_at_ricks-web.info>
Date: Mon, 25 Nov 2002 14:47:48 -0500
Message-ID: <uu4vivmm77603f@news.supernews.com>


> Use SUBSTR. Hopefully you have defined the phone number column as
> varchar2 rather than number. Columns which always contain numeric data
> should still be defined as varchar2 if you're not ever going to be using
> them in calculations, and I can't imagine what calculations anyone would
> ever want to do with phone number. Anyway you can
>
> UPDATE table
> SET phonenum = 'xxx'||SUBSTR(phonenum,4)
> WHERE SUBSTR(phonenum,1,3) = 'yyy';
>

This worked like a charm. I was using numbers, but using TO_CHAR worked out.

Thanks! Received on Mon Nov 25 2002 - 13:47:48 CST

Original text of this message

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