SET @string := '1a4b';
SELECT CONV(@string,16,10);
+---------------------+
| CONV(@string,16,10) |
+---------------------+
| 6731
Thanks. That works perfectly.
Much appreciated.
On February 28, 2010, Michael Dykman <mdyk...@gmail.com> wrote:
It's still a string, but this should accomplish 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
<mysql.l...@juun.com> wrote:
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... but I
ensure that the bytes are in little endian order when sending the string to
the server, and the server itself is little endian, so endianness is
not the
problem with this conversion that I'm trying to do.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com
--
- michael dykman
- mdyk...@gmail.com
May the Source be with you.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org