How to update database when using wild characters for example like
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.
精彩评论