Re: UNHEXING to integer (as opposed to a string)...

2010-02-28 Thread mysql.l...@juun.com
mplish what you are after. No endian issues apply here. SET @string := '1a4b'; SELECT CONV(@string,16,10); +-+ | CONV(@string,16,10) | +-+ | 6731 - michael dykman On Sun, Feb 28, 2010 at 12:08 PM, mysql.l...@juun.com wrote: Oops: This litt

Re: UNHEXING to integer (as opposed to a string)...

2010-02-28 Thread mysql.l...@juun.com
Oops: This little bit doesn't make sense, logically: "The hex string is in little endian byte order (since it represents a 2-byte integer or short)"... What I was trying to say is that the integer that this hex string represents is multi-byte, so the order of the hex bytes **is** important..

Re: UNHEXING to integer (as opposed to a string)...

2010-02-28 Thread mysql.l...@juun.com
Oops: This little bit doesn't make sense, logically: "The hex string is in little endian byte order (since it represents a 2-byte integer or short)"... What I was trying to say is that the integer that this hex string represents is multi-byte, so the order of the hex bytes **is** important..

UNHEXING to integer (as opposed to a string)...

2010-02-28 Thread mysql.l...@juun.com
I've tried several ways to get my hex-encoded string representation of an integer to convert back to an integer, but none of them work (the input string '1a4b' should evaluate to 6731): (Note that this is not an endianness problem. The hex string is in little endian byte order (since it rep