Re: substr-function
Date: Wed, 18 Jul 2001 13:28:10 +0200
Message-ID: <3b5571b5$1_at_news.vogel.pl>
[Quoted] Hope it would help you.
Here is the example:
DECLARE
source VARCHAR2(2000); dest VARCHAR2(2000); x NUMBER; str1 VARCHAR2(100) := 'http://182.44.236.3'; str2 VARCHAR2(100) := 'http://mysite.com';
BEGIN
source := 'Please contact at http://182.44.236.3 for more information.';
x := INSTR(source, str1);
dest := SUBSTR(source, 1, x - 1)||str2||SUBSTR(source, x + length(str1));
DBMS_OUTPUT.Put_Line(source);
DBMS_OUTPUT.Put_Line(dest);
END;
/
Uzytkownik "Gomber_at_Home" <sgomber_at_adlink.net> napisal w wiadomosci
news:3B54ABDF.1790060D_at_adlink.net...
> Hi,
> i need some help on generating the right syntax for my specific problem
> - i need to exchange some characters in a string for each appearance in
> the clomn, e.g 'http://182.44.236.3' to 'http://mysite.com' ... i've
> already played around with it for a while but i don't know how to built
> up the command...
>
>
> thanks a lot in advance
>
> Sven
>
>
>
>
Received on Wed Jul 18 2001 - 13:28:10 CEST