I have a HEX value (a colour code in the form 0xE1D7A6) which is stored as a varchar and I want to convert it to Integer.
If I do
SELECT 0xE1D7A6*1 HextoInt
this gives me the correct integer value of 14800806
However, If I try to do this with the string it just returns the same string.
How can I make this string be interpreted as if it were a varbinary? (note: I don't want to convert it to a varbinary as this completely changes its value.