17

Does anybody know how to view the contents of fields containing binary data in an MS SQL Server 2005 database?

3
  • If the data is binary... how would you "view" it? Commented Feb 10, 2009 at 15:34
  • It may be a string in which case viewing it in ascii or hex form would suffice. At the moment all I see is <Binary data>. Commented Feb 10, 2009 at 15:36
  • use a query not the open table wizard, see my answer below Commented Feb 10, 2009 at 15:50

1 Answer 1

23

Depends if it is just text stored as binary or not, if it is then take a look at this

create table #bla (col1 varbinary(400))

insert #bla values(convert(varbinary(400),'abcdefg'))

select col1,convert(varchar(max),col1)
from #bla

output 0x61626364656667 abcdefg

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I was hoping for a utility to take some of the legwork out of it but this is a workable solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.