Replace content in database table (SQL)
You may have rows in your database that contains <br>, which you want to replace with line breaks (this may be the case if you are using Server.HtmlEncode to encode your output, which you didn't previously do). This can simply be done using the replace function (note the line break):
UPDATE [table]
SET
[column]= REPLACE([column], '<br>', '
')
WHERE
[column] LIKE '%<br>%'
Also, if you wish to convert < and > to their html encoded equivalents:
UPDATE [table]
SET
[column]= REPLACE([column], '<', '<')
WHERE
[column] LIKE '%<%'
UPDATE [table]
SET
[column]= REPLACE([column], '>', '>')
WHERE
[column] LIKE '%>%'
Or to do the reverse:
UPDATE [table]
SET
[column]= REPLACE([column], '<', '<')
WHERE
[column] LIKE '%<%'
UPDATE [table]
SET
[column]= REPLACE([column], '>',...