I need to convert VARCHARwith a hexadecimal number in INT, I tried:
DECLARE @H VARCHAR(2);
SELECT @H = '9a'
SELECT CONVERT(INT, 0x + @H)
But he says it @Hshould be VARBINARY, and if I surrender, I get a completely different number.
From '9a'I want to get 154, how can I achieve it?
source
share