一条sql

update msg_info set
content_object=replace(convert(nvarchar(2000),content_object),substring(content_object,charindex('<CreditCradNumber>',content_object)+18,(charindex('</CreditCradNumber>',content_object)-charindex('<CreditCradNumber>',content_object))-18),'*****************'+right(substring(content_object,charindex('<CreditCradNumber>',content_object)+18,(charindex('</CreditCradNumber>',content_object)-charindex('<CreditCradNumber>',content_object))-18),4))
where content_object like '%<CreditCradNumber>%'

你可能感兴趣的:(一条sql)