How do you convert an integer into a string of hex? I want to convert the int into a format that I can use as a color on my page for example '#ff0000'.
So for example:
--This converts my int to hex:
CONVERT(VARBINARY(8), Color) Color,
And I want to do something like this:
'#' + CONVERT(NVARCHAR(10), CONVERT(VARBINARY(8), Color)) Color
But converting a varbinary string just converts it to an ascii character rather than returning the actual hex string