Is there any function like REPLACE?

Is there any function to replace words in ASE?

+4
source share
3 answers

Try the following:

SELECT str_replace( 'impossible', 'im',':)' ) 
+8
source
 select str_replace(original,search,replacement) 

ASE does not have "REPLACE", but "str_replace". This will return varchar (LONG), you may have use cast to reduce it.

+1
source

REPLACE (source string, search string, replacement string)

 SELECT REPLACE( 'abc,def,ghi,jkl', 'abc', 'xx' ) FROM products 
0
source

All Articles