February 25, 2014 at 12:18 pm
I need the hex digits of a column, I had the code before but forgot it.
EXAMPLE:
SELECT COL1, COL1 as varbinary FROM TABLE
RESULTS:
CAT, 0x0324324324432 <--- something like that
February 25, 2014 at 12:35 pm
What's wrong with using CAST?
SELECT 'CAT', CAST( 'CAT' AS varbinary)
February 25, 2014 at 12:35 pm
Check function CONVERT in BOL.
SELECT CONVERT(char(50), CAST(113 AS binary(4)), 1) AS c1;
GO
February 25, 2014 at 12:36 pm
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply