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: How can I convert strings efficiently?

Re: How can I convert strings efficiently?

From: SoulSurvivor <markyg_7_at_yahoo.co.uk>
Date: 3 Apr 2003 06:34:23 -0800
Message-ID: <8d9c6fd.0304030634.6f2df43a@posting.google.com>


Not a problem. The other translate method seems fine too.

The one i used was part of a bigger package which did things like clean up junk from a paragraph, convert first letter from lowercase to uppercase after a full stop etc. Dont have all that code on me but :-(

M

"Guido Konsolke" <Guido.Konsolke_at_triaton.com> wrote in message news:<1049295947.272539_at_news.thyssen.com>...

> "SoulSurvivor" wrote ...

> > You can write your own function to loop through the string and replace
> > any junk if you wish if you dont want to use Replace.
> >
> > Here is one i just done.
> >
>  (snipped a bit)

> >
> > IF (ASCII(v_chr) >= 65 AND ASCII(v_chr) <= 90) OR -- A to Z
> > (ASCII(v_chr) >= 97 AND ASCII(v_chr) <= 122) OR -- a to z
> > (ASCII(v_chr) >= 48 AND ASCII(v_chr) <= 57) THEN -- 0 to 9
> >
>  (snipped even more)

> >
> > 1* select Format_String('ABC;[=/#DEF12+3') FROM DUAL
> > SQL> /
> >
> > FORMAT_STRING('ABC;[=/#DEF12+3')
> > ---------------------------------------------------------------
> > ABCDEF123
> 
> Hi,
> 
> thanks very much for taking the time to response. I really appreciate it.
> I like the use of ASCII function, it didn't come to my mind.
> But I think I'll go with what Andrew provided in his post because
> I also have to convert capitals to lower letters. He put it in his example
> so lazy me has got to do even less work ;-))
> 
> Bye,
> Guido
Received on Thu Apr 03 2003 - 08:34:23 CST

Original text of this message

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