Convert binary/varbinary(8) to something readable
Posted on 2010-09-03
I have a table that stores a company id as binary(8) when I try to convert that field into something readable. I seem to get strange results.
I tried the following code:
select company_id,convert(int,company_id) --->if there is a dash "-" in the number it only gives me the number to the right of dash
select company_id,convert(varchar,company_id) ---> gives me a blank field
Thanks in advance for any help I recieve.