Obfuscating credit card or Social Security numbers

Here's a function that will obfuscate a string of credit card or social security numbers. It can be useful to prevent information from being displayed in reports or other output from the database.

You can download the script from the file attachment.

Create_fn_ReplaceNumberSequence_BlogPost.sql