Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: basic sql help please
> 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
![]() |
![]() |