[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Cecil Westerhof
2016-04-21 12:39 GMT+02:00 Dave Wellman : > How about something like: > > WITH RECURSIVE > expansion(byte) AS ( > SELECT 0 > UNION ALL > SELECT byte + 1 FROM expansion > LIMIT 10 > ) > SELECT PRINTF('%02d',byte) > FROM expansion > ; > ?Yes, that is exactly what I want.

[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Cecil Westerhof
2016-04-21 12:20 GMT+02:00 Cecil Westerhof : > > 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

[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Cecil Westerhof
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

[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Dave Wellman
-users-boun...@mailinglists.sqlite.org] On Behalf Of Cecil Westerhof Sent: 21 April 2016 11:20 To: SQLite mailing list Subject: [sqlite] SELECT 0 gives TEXT instead of INTEGER I have the following: WITH RECURSIVE expansion(byte) AS ( SELECT 0 UNION ALL SELECT byte + 1 FROM expansion

[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Simon Slavin
On 21 Apr 2016, at 11:20am, Cecil Westerhof wrote: > ?I would expect to get 00-09, but I get 30-39. 30 is the hex-value of the > ASCII 0.

[sqlite] SELECT 0 gives TEXT instead of INTEGER

2016-04-21 Thread Hick Gunter
lite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Cecil Westerhof Gesendet: Donnerstag, 21. April 2016 12:20 An: SQLite mailing list Betreff: [sqlite] SELECT 0 gives TEXT instead of INTEGER I have the following: WITH RECURSIVE expansion(byte) AS ( SELECT 0 UNION ALL SELECT byt