Skip to content

Instantly share code, notes, and snippets.

@mattmc3
Created March 26, 2019 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattmc3/9c24d2302a05bdb9a9e1a2cc646e4af5 to your computer and use it in GitHub Desktop.
Save mattmc3/9c24d2302a05bdb9a9e1a2cc646e4af5 to your computer and use it in GitHub Desktop.
MSSQL - replace non-printable non-ascii characters
select dbo.RegexReplace(t.my_column, '[^\x20-\x7E]', '~') as scrubbed
from my_table t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment