n0ch1ps
asked on
Varbinary to Varchar
I realise this question has no doubt been asked and answered many times, however I'm asking it anyway.
I need to convert a varbinary data type to Varchar so the results are viewable to certain applications we run that cannot read binary.
Many thanks
I need to convert a varbinary data type to Varchar so the results are viewable to certain applications we run that cannot read binary.
Many thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do you need 0x4E4E to read 'NN' or '0x4E4E' ?
ASKER
I'd need '0x000174F400004FF6000E000 00000' to read '0x000174F400004FF6000E000 00000'
cheers
cheers
Then you can use the system function fn_varbintohexstr
declare @a varbinary(200)
set @a = 0x00FF00FF
select master.dbo.fn_varbintohexs tr(@a)
declare @a varbinary(200)
set @a = 0x00FF00FF
select master.dbo.fn_varbintohexs
then check the accepted answer in the link i posted by p_puranik
Oops please ignore my post above (same solution than sajuks's post)
My apologies sajuks
My apologies sajuks
Hilaire no apology needed...i wasnt sure what o/p was to be shown and posted what am currently using.