如下,在Sqlserver里面trim函数不支持,希望帮忙给我将下面一段代码转换一下,非常感谢
trim(replace(replace(b.content2,':',''),'n','')) as 项目名称,
case
when instr(content_price2,'(元') > 0 then trim(replace(replace(substring_index(content_price2, '(元',1),':',''),':',''))
when instr(content_price2,'(万元') > 0 then trim(replace(replace(substring_index(content_price2, '(万元',1),':',''),':',''))
when instr(content_price2,'(人民币') > 0 then trim(replace(replace(substring_index(content_price2, '(人民币',1),':',''),':',''))
when instr(content_price2,' 万元') > 0 then trim(replace(replace(substring_index(content_price2, ' 万元',1),':',''),':',''))
when instr(content_price2,'万元') > 0 then trim(replace(replace(substring_index(content_price2, '万元',1),':',''),':',''))
when instr(content_price2,'元') > 0 then trim(replace(replace(substring_index(content_price2, '元',1),':',''),':',''))
else trim(replace(replace(content_price2,':',''),':',''))
end as 成交金额