Would converting to a number work for you?
SELECT CAST(@hex AS int)
>I am trying to capture the criticle digits of a banary data type (0x1a). I have tryied casting it to a type of char, but it does not work. For example
>
>DECLARE @hex binary(1),
> @char varchar(10)
>
>SET @hex = 0x22
>print @hex
>SET @char = convert(varchar(10), @hex)
>print @char
>SET @hex = @hex + 2
>print @hex
>SET @hex = @hex + 9
>print @hex
>
>gives the result:
>
>0x22
>"
>0x24
>0x2D
>
>
>Any ideas??
--sb--