Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what is the equivalent of replace in Sybase

377 views
Skip to first unread message

Satya Raju

unread,
Aug 9, 2001, 1:55:14 PM8/9/01
to
Hi All
What is the equivalent of replace(Oracle, SQLServer) in Sybase.
If there is no equivalent.
Is there any work around for this.
Please let me know.

Thanks,
Raju.


Rob Verschoor

unread,
Aug 9, 2001, 2:53:59 PM8/9/01
to
I'm not sure what replace() does, but if it's a string replacement
function then the ASE equivalent is stuff().
Syntax and description are in the ASE Quick Reference Supplement,
which you can download from http://www.sypron.nl/ase_qref.html (for a
better version, see my book -- www.sypron.nl/qr).

HTH,

Rob
----------------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.0/11.5/11.0

Author of "The Complete Sybase ASE Quick Reference Guide"
Online orders accepted at http://www.sypron.nl/qr

email mailto:r...@sypron.nl.*No*Spam*Please*
WWW http://www.sypron.nl
snail Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
----------------------------------------------------------------------

"Satya Raju" <sr...@callidussoftware.com> wrote in message
news:MeOp##PIBH...@forums.sybase.com...

PB

unread,
Aug 10, 2001, 2:08:03 PM8/10/01
to
I think 'replace' command in oracle is to replace procedure code without
drop/recreate, right?
If this is the one, then the equivalent in sybase is sp_recompile.


Satya Raju <sr...@callidussoftware.com> wrote in message
news:MeOp##PIBH...@forums.sybase.com...

Ivan Santhumayor

unread,
Aug 11, 2001, 1:39:09 AM8/11/01
to
Oracle and SQLServer also have a string function called REPLACE() which is a
transformation string function.
In Sybase it could be achieved using substring() + stuff() or by writing a
UDF in ASE12.

--
Note: These are my own views and not that of my employer or client

Satya_Raju

unread,
Aug 15, 2001, 3:50:56 PM8/15/01
to
Talking about replace() in SQL. I want to replace a character with another
character in the string.
Got this by combining isnull(), stuff(), charindex().
Example: Want to replace 'a' with 'b' in the string
Then the following will do.
isnull(stuff(string, charindex( 'a', string ), 1, 'b' ), string).

Appriciate your resoponces.
Thanks to you all,
Raju.

0 new messages