Our company is using SQL Server 2008 to manage the website's database. We have currently had a name change and so I need to change all occurrences of our old company name.
The database has multiple Tables and A LOT of columns under each table, I am only interested in finding and updating the text from all columns in one table.
Essentially what I need to be able to do is; find the string "CSQTC" over all columns in a table named "Practices", note that some columns may not contain strings, and some values in the columns may be null.
I think I know how to search for text over multiple columns, but it is a lot of code and I am sure there is a better way. This is how I think I do it
WHERE columnName LIKE '%CSQTC%'
AND columnName2 LIKE '%CSQTC%'
AND columnName3 LIKE '%CSQTC%'
AND ....
Surely there is a better way?
Thanks heaps!
EDIT: I forgot to ask how I can replace each occurence of 'CSQTC' to be 'GPTQ' instead? Thanks again