4

What's the most efficient way to convert the output of this function from a varbinary() to a a varchar()?

3 Answers 3

6

How about this:

master.sys.fn_varbintohexstr(@binvalue)
Sign up to request clarification or add additional context in comments.

Comments

2

For SQL Server 2008 use

CONVERT(varchar, @binary, 1)

1 - style 0x060D, 2 - 060D

http://msdn.microsoft.com/en-gb/library/ms187928.aspx

Comments

1

CONVERT(varchar, @binary)

Comments

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.