Sybase的SQL如何去掉字符串中间的空格?
select StringReplace(' dfdd df dfd',' ','')
select str_replace(' abc bcd cde def', ' ', '');
[解决办法]
http://forums.databasejournal.com/archive/index.php/t-40207.html
Sybase doesnt have a replace cmd. you have to use a combo of charindex and stuff to replace it.
you could have the following to replace ur string.
declare @my_var char(25) select @my_var = 'abc|ert|rfrfrf|' while charindex('|', @my_var) > 0 begin select @my_var = stuff(@my_var, charindex('|', @my_var), 1, ';') end select @my_var
[解决办法]
Maybe you can have a try with str_replace function?
str_replace(strexpression1,strexpression2,strexression3)