Is there any function like REPLACE?

笑着哭i 提交于 2019-12-07 07:13:20

问题


Is there any function to replace words in ASE?


回答1:


Try this:

SELECT str_replace( 'impossible', 'im',':)' )  



回答2:


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.




回答3:


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

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


来源:https://stackoverflow.com/questions/6547383/is-there-any-function-like-replace

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!