Return to Snippet

Revision: 67157
at August 18, 2014 08:24 by lottegis


Updated Code
UPDATE   table
SET      column = REPLACE(column, search_string, replace_string)
WHERE    column LIKE '%search_string%'


--Example
UPDATE   DatabaseName.TableName
SET      PDF_NAME = REPLACE(PDF_NAME, '+', '_')
WHERE    PDF_NAME LIKE '%+%'

Revision: 67156
at August 18, 2014 08:12 by lottegis


Initial Code
UPDATE   table
SET      column = REPLACE(column, search_string, replace_string)
WHERE    column LIKE '%search_string%'

Initial URL

                                

Initial Description
Example below

Initial Title
Mass-replace a substring

Initial Tags

                                

Initial Language
SQL