4

Is there any function to replace words in ASE?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
SSE
  • 445
  • 2
  • 10
  • 29

3 Answers3

9

Try this:

SELECT str_replace( 'impossible', 'im',':)' )  
Jason Plank
  • 2,336
  • 5
  • 31
  • 40
deepak
  • 141
  • 2
  • 9
1
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 shrink it back down.

nka
  • 41
  • 4
0

REPLACE ( original-string, search-string, replace-string )

SELECT REPLACE( 'abc,def,ghi,jkl', 'abc', 'xx' ) FROM products
sudheshna
  • 1,150
  • 1
  • 13
  • 24