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: put away characters in result of query

Re: put away characters in result of query

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 23 Dec 2005 07:03:00 -0500
Message-ID: <HKmdndpYI8jrejbeRVn-tA@comcast.com>


"T" <t_at_yahoo.com> wrote in message news:dogloa$car$1_at_ss405.t-com.hr...
>i supose there is some regular expresion to solve this problem..
>
> "translate" only translate known characters with known characters, but i
> need universal solution to translate all character (:alpha:) to ''
> (empty - null string)
>
> "Carlos" <miotromailcarlos_at_netscape.net> wrote in message
> news:1135335647.298272.75090_at_g49g2000cwa.googlegroups.com...
>> Take a look at TRANSLATE function.
>>
>> Also, you might want to create a hand-made function that fulfills your
>> requirements if needed.
>>
>> Cheers.
>>
>> Carlos.
>>
>
>

  1. don't top-post. that upsets regular contributors and gets you less (or no) help if you continue
  2. characters in the the 2nd parameter of the translate function that do not exist in the 3rd are dropped (but you have to have at least one character in the 3rd parameter, it cannot be null

there was a post awhile ago where someone put a translate inside of a translate to accomplish what you're trying to do. it went something like this:

select
  translate('abc1234','x1234567890','x') , translate('abc1234', '1'||translate('abc1234','x1234567890','x'), '1') from dual

the first translate just shows how it works the second translate illustrates a way to reverse the sense of the first one

++ mcs Received on Fri Dec 23 2005 - 06:03:00 CST

Original text of this message

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