Re: Substitute Characters in SQL

From: Rajesh Badani <badani_at_mfa.com>
Date: 22 Mar 1995 19:00:39 GMT
Message-ID: <3kps4o$e93_at_homer.alpha.net>


In article <3kms9a$nt6_at_nz12.rz.uni-karlsruhe.de>, Stefan Scheck <scheck_at_ask.uni-karlsruhe.de> writes:
|> I have a special problem concerning a SELECT-Statement.
|>
|> I need a SQL-Funktion (just like Translate) which replaces
|> the occurance of all characters c1 in a String by a corresponding
|> string s1.
|> Unfortunately Translate is a funktion for Character-Substitution,
|> not for String-Substitution.
|>
|> Taht's what I want:
|>
|> Example: SELECT F('EXAMPLE') FROM DUAL;
|>
|> Result : xyzXAMPLxyz
|>
|> The Funktion F should be able to substitute all 'E's with 'xyz'.
|>
|> I cannot use PL/SQL, because I want to create a View with such a
|> SQL-Statement.
|>
|> If someone has a solution for this problem, please let me know.
|>
|> Stefan Scheck
|> E-Mail: scheck_at_ask.uni-karlsruhe.de

Hi,

        How does a REPLACE function from Oracle sound to you?

Rajesh Badani Received on Wed Mar 22 1995 - 20:00:39 CET

Original text of this message