Skip to content

Instantly share code, notes, and snippets.

@jordanyaker
Last active December 23, 2015 00:49
Show Gist options
  • Save jordanyaker/6555708 to your computer and use it in GitHub Desktop.
Save jordanyaker/6555708 to your computer and use it in GitHub Desktop.

Use the following code when selecting a column from a table:

  CAST(
    CAST(N'' AS XML).value(
        'xs:base64Binary(sql:column("Name"))'
      , 'VARBINARY(MAX)'
    ) 
    AS VARCHAR(MAX)
  ) Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment