SQL中,对不法文字进行替换成*号。
我是这样写的:
update A
set RContents = Replace(RContents,'死','*')
where rid=2但是在字段名RContents出了点问题。。
我不知道要怎么把RContents里面的文字给提取出来。
知道的朋友帮我说下。。
谢谢
我是这样写的:
update A
set RContents = Replace(RContents,'死','*')
where rid=2但是在字段名RContents出了点问题。。
我不知道要怎么把RContents里面的文字给提取出来。
知道的朋友帮我说下。。
谢谢
我不知道要怎么把RContents里面的文字给提取出来。是这里不明白
declare @a table(spbm char(3),jhsl int)insert @a
select '001',10 union all
select '001',30 union all
select '002',10update @a
set spbm=replace(spbm,'0','*')select * from @a
/*
spbm jhsl
**1 10
**1 30
**2 10
*/
原来我的类型是NTEXT的。
不能使用REPLACE进行替换。