替换1个查询中的多个字符 [英] Replace multiple characters in 1 query
本文介绍了替换1个查询中的多个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何在1个查询中替换多个角色
例如: -
,< html>
以上所有字符都应该替换wirh空格。
以下是我的查询
Hi All,
How can i replace many character in 1 query
eg:-
,<html>
All above character should replace wirh space.
Below is my query
select empDesc from emp
empname具有应替换为空格的字符
请帮助
empname has the character that should replace with space
Please help
推荐答案
您可以乘以 REPLACE() [ ^ ]功能。
You can multiply REPLACE()[^] function.
DECLARE @aText NVARCHAR(100)
SET @aText = '<html>i am % a good #@ boy.'
SELECT REPLACE(REPLACE(REPLACE(@aText,'#@',''),'%',''),'<html>','')
结果:我是一个好孩子
这篇关于替换1个查询中的多个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文