Skip to content

Instantly share code, notes, and snippets.

@sniffdk
Last active November 16, 2018 17:31
Show Gist options
  • Save sniffdk/5c000e1ac2ae6f47ab16db09c5af5918 to your computer and use it in GitHub Desktop.
Save sniffdk/5c000e1ac2ae6f47ab16db09c5af5918 to your computer and use it in GitHub Desktop.
Replace ntext sql
-- https://stackoverflow.com/a/4341677/701242
UPDATE [table]
SET [column] = CAST(REPLACE(CAST([column] as NVarchar(MAX)),'find','replace') AS NText)
WHERE [column] LIKE '%find%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment