Skip to content

Instantly share code, notes, and snippets.

@saostad
Last active August 18, 2021 13:30
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 saostad/daf00bf55e020e311066e610fd312be2 to your computer and use it in GitHub Desktop.
Save saostad/daf00bf55e020e311066e610fd312be2 to your computer and use it in GitHub Desktop.
How to decode base64 columns inline with T-SQL query
SELECT convert(varchar(max),cast(N'' as xml).value('xs:base64Binary(sql:column("MBAMPolicy.EncodedComputerName0"))', 'VARBINARY(MAX)')) AS [Computer Name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment