THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » SQL Server 2005 » Algorithm   (RSS)
  • Convert binary value to string value

    With SQL Server 2008, we can easily useDECLARE @bin VARBINARY(MAX)SET     @bin = 0x5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8SELECT  CONVERT(VARCHAR(MAX), @bin, 2)But how can we do this in SQL Server 2005?You can't use a simple CAST or CONVERT, because you get the ASCII representation of the binary values.So, here is how you ...
    Posted to Peter Larsson (Weblog) by Peso on January 27, 2010
Privacy Statement