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: Q: sql to strip off special character ?

Re: Q: sql to strip off special character ?

From: RC <rclarence_at_tyc.com>
Date: Tue, 04 Jan 2000 21:30:21 GMT
Message-ID: <s74pjda55k255@corp.supernews.com>

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

Original text of this message

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