How can I get from this SQL Server varbinary:
如何从此SQL Server varbinary获取:
0x63C34D6BCAD555EB64BF7E848D02C376
To this varchar?
到这个varchar?
'63C34D6BCAD555EB64BF7E848D02C376'
1 个解决方案
#1
7
declare @B varbinary(max) = 0x63C34D6BCAD555EB64BF7E848D02C376
declare @C varchar(35)
set @C = stuff(upper(sys.fn_varbintohexstr(@B)), 1, 2, '')
select @C
Result:
63C34D6BCAD555EB64BF7E848D02C376
#1
7
declare @B varbinary(max) = 0x63C34D6BCAD555EB64BF7E848D02C376
declare @C varchar(35)
set @C = stuff(upper(sys.fn_varbintohexstr(@B)), 1, 2, '')
select @C
Result:
63C34D6BCAD555EB64BF7E848D02C376