Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

REPLACE function

4 posts in Product Futures Discussion Last posting was on 2002-11-15 19:13:50.0Z
Peter Weighill Posted on 2002-01-18 21:14:29.0Z
From: "Peter Weighill" <noemail@nothing>
Subject: REPLACE function
Date: Fri, 18 Jan 2002 21:14:29 -0000
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <uY#BxWGoBHA.189@forums.sybase.com>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: host62-7-89-177.btinternet.com 62.7.89.177
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:909
Article PK: 94433

I posted this to ase.general before but I think I need to repost it here:

It would be nice if Sybase ASE has a REPLACE function similar to the one in
MS SQL Server.


REPLACE (T-SQL)
Replaces all occurrences of the second given string expression in the first
string expression with a third expression.

Syntax
REPLACE('string_expression1', 'string_expression2', 'string_expression3')

Examples
This example replaces the string cde in abcdefghi with xxxx.

SELECT REPLACE('abcdefghicde','cde','xxxx')
GO

Here is the result set:
------------------------------------------------------------------------
abxxxxfghixxxx
(1 row(s) affected)


vasris Posted on 2002-03-19 16:32:21.0Z
From: vasris@yahoo.com
Date: Tue, 19 Mar 2002 11:32:21 -0500
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: REPLACE function
Message-ID: <10135F203A9A8BA1005ADA3185256B81.007AC56885256B45@webforums>
References: <uY#BxWGoBHA.189@forums.sybase.com>
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:654
Article PK: 94185

What about if you want to use this with column name, I have tried to do:

Update @ClientInfo
Set FirstName = replace(FirstName, '&', '&amp;')

and is not changing anything, but if I use somehing else beside '&' is
working

vascris@yahoo.com


Bret Halford Posted on 2002-11-15 19:13:50.0Z
Message-ID: <3DD5476E.9A0DB04D@sybase.com>
Date: Fri, 15 Nov 2002 12:13:50 -0700
From: Bret Halford <bret@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: REPLACE function
References: <uY#BxWGoBHA.189@forums.sybase.com> <10135F203A9A8BA1005ADA3185256B81.007AC56885256B45@webforums>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
Lines: 12
NNTP-Posting-Host: 157.133.80.136
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:246
Article PK: 93420

An str_replace() function has been checked into the ASE 12.5 code, and
is expected
to be available with the 12.5.0.3 IR release.

-bret

vasris@yahoo.com wrote:
>
> What about if you want to use this with column name, I have tried to do:
>
> Update @ClientInfo
> Set FirstName = replace(FirstName, '&', '&amp;')
>
> and is not changing anything, but if I use somehing else beside '&' is
> working
>
> vascris@yahoo.com


j Posted on 2002-01-23 10:30:35.0Z
From: J
Date: Wed, 23 Jan 2002 05:30:35 -0500
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: REPLACE function
Message-ID: <B23C0D1104977EDA0039BB4285256B4A.007AC56885256B45@webforums>
References: <uY#BxWGoBHA.189@forums.sybase.com>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:889
Article PK: 94415

I think it is time to wake up, and keep a closer watch on what is out
there,
and then actually making an effort to add it to ASE.

Once again not a critical feature, but sufficienty nice to start counting
along with a few others...

Patiente is a virtue, ture, and I guess it is important to focus on
essentials,
but this can surely not be THAT much work, even on 5-7 different
platforms...

J

>I posted this to ase.general before but I think I need to repost it here:
>It would be nice if Sybase ASE has a REPLACE function
>similar to the one in MS SQL Server.