我想替换item_desc中的特殊字符。这些数据正在转换为电子数据交换,而我的描述中没有~或*。
下面的代码可以工作吗?我有两个标记,因为它是动态SQL。
replace(replace(sd.item_desc,''*'',''''),
sd.item_desc,''~'','''') item_desc发布于 2018-08-27 22:44:20
不,这行不通的。试试这个:
replace(replace(sd.item_desc, ''*'', ''''), ''~'', '''') item_desc正如您所知,replace的第一个参数是一个字符串,因此您需要在外部replace中提供字符串,这将是由内部replace返回的字符串。
https://stackoverflow.com/questions/52040110
复制相似问题