Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: sql to strip off special character ?
tedchyn wrote:
>
>
> sir, I have a free text phone number. for example
>
> 1(933)-777-9999
> 933-777-9999
> #933-777-9999
>
> there is no way of predicting what special charcter may present. how
> do I strip off special charcter either with sql update or plsql function
> beside
> 1. using nested replace function(which requires you know the special
> character ahead of time) or
> 2. plsql block - fetch into a variable and use a for loop to take care
> all special charater(s).
>
> Thanks in advance
> ted chyn
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
You could loop through the string in a PL/SQL function and check that each
character is in the set 0-9. If it is keep it if not remove it from the
string. You could use the INSTR function for the parsing.
HTH RC
--
Posted via CNET Help.com
http://www.help.com/
Received on Tue Jan 04 2000 - 15:30:21 CST
![]() |
![]() |