2016-04-21 12:20 GMT+02:00 Cecil Westerhof <cldwesterhof at gmail.com>:
> > I have the following: > WITH RECURSIVE > expansion(byte) AS ( > SELECT 0 > UNION ALL > SELECT byte + 1 FROM expansion > LIMIT 10 > ) > SELECT hex(byte) > FROM expansion > ; > > ?I would expect to get 00-09, but I get 30-39. 30 is the hex-value of the > ASCII 0. How would I get what I want. I could subtract 48, but that is not > my preferred solution.? > ?It is a bit strange, because the following: WITH RECURSIVE expansion(byte) AS ( SELECT 0 UNION ALL SELECT byte + 1 FROM expansion LIMIT 10 ) SELECT byte, hex(byte), typeof(byte) FROM expansion ; gi?ves: 0|30|integer 1|31|integer 2|32|integer 3|33|integer 4|34|integer 5|35|integer 6|36|integer 7|37|integer 8|38|integer 9|39|integer -- Cecil Westerhof