I've got a table with two columns, ID
and Value
.
(我有一个包含两列的表, ID
和Value
。)
I want to change a part of some strings in the second column. (我想在第二列中更改某些字符串的一部分。)
Example of Table:
(表示例:)
ID Value
---------------------------------
1 c:emp123abc111
2 c:emp123abc222
3 c:emp123abc333
4 c:emp123abc444
Now the 123\
in the Value
string is not needed.
(现在,不需要Value
字符串中的123\
。)
I tried UPDATE
and REPLACE
: (我尝试了UPDATE
和REPLACE
:)
UPDATE dbo.xxx
SET Value = REPLACE(Value, '%123%', '')
WHERE ID <= 4
When I execute the script SQL Server does not report an error, but it does not update anything either.
(当我执行脚本时,SQL Server不会报告错误,但也不会更新任何内容。)
Why is that? (这是为什么?)
ask by aston_zh translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…