Solved

How do I convert Binary to Text in SQL Server?

Posted on 2011-09-12
1
692 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

920 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

16 Experts available now in Live!

Get 1:1 Help Now