Take the 2-minute tour ×  I want to do conversion in T-SQL from
a varbinary type to string type  Here is an example :  First I
got this varbinary   And then I want to convert it to   How to
do this?  share|improve this question What version of SQL Server
do you have? Andras's answer only works on 2008 or higher, for
example. –  Pondlife Aug 27 '12 at 9:16 That's true, I updated
my answer, so if you have older version you need a different
solution –  András Ottó Aug 27 '12 at 9:19  4 Answers 4  up vote
23 down vote accepted   DECLARE @varbinaryField varbinary(max);
SET @varbinaryField = 0x21232F297A57A5A743894A0E4A801FC3;
SELECT CONVERT(varchar(max),@varbinaryField,2),   UPDATED: For
SQL Server 2008  share|improve this answer  I know this is an
old question, but here is an alternative answer that I have
found more useful in some situations. I believe the function has
been available at least since SQL2K. Adding it here just for
completeness.  declare @source varbinary(max); set @source =
0x21232F297A57A5A74389