开发者

How to update database when using wild characters for example like

开发者 https://www.devze.com 2023-01-01 17:35 出处:网络
I have column which consists of pathfor example \\\\Abc\\F\\E\\record_123, now i need to update the path in database where only one change i need to do is this:

I have column which consists of path for example \\Abc\F\E\record_123, now i need to update the path in database where only one change i need to do is this:

\\Abc\F\E\record_123 = \\Abc\F\G\r开发者_StackOverflow中文版ecord_123 - i want to update E to G .

how to do that with update query in database?


REPLACE('\Abc\F\E\record_123', '\E\', '\G\')

You have clear delimiters that allows you to pick out the bits you want to replace


See SQL Server string functions on MSDN. REPLACE() would be a good candidate.

0

精彩评论

暂无评论...
验证码 换一张
取 消