Solved

How do I convert Binary to Text in SQL Server?

Posted on 2011-09-12
1
691 Views
Last Modified: 2012-05-12
I am querying a Goldmine database and need to convert Goldmine..Notes.Notes from Binary Image to Text.

Here is a sample of what the field is storing '0x342F3520492063616C6C656420746F20666F6C6C6F77207570206F6E206661697276696577206C65747465722073656E7420746F2072656974726565732E204C454654204D53472E203C62723E3C62723E5468652070686F6E65206E756D6265722077652068617665206C6973746564206D6179206E6F7420626520636F72726563742E204E6F206C697374696E6720696E2071776573746465782E3C62723E00'

0
Comment
Question by:pcgym
1 Comment
 
LVL 11

Accepted Solution

by:
stevengraff earned 500 total points
ID: 36523405
try:

cast(cast(notes as varbinary(max))as varchar(max))

0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL Bulk load data error 5 34
How to find duplicates in SQL Server 3 23
SQL Server 2012 Row Selection 2 31
Azure SQL DB? 3 22
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now