Re: [sqlite] text/numeric comparison confusion

2017-01-26 Thread Dominique Devienne
On Thu, Jan 26, 2017 at 5:04 PM, David Raymond wrote: > Other thing to point out is that constants/(expressions that aren't coming > from a field in a table) have "no affinity", so explicitly typing '25' is a > no affinity, not a text affinity, and 25 is no affinity, not integer > affinity. (Sect

Re: [sqlite] text/numeric comparison confusion

2017-01-26 Thread Hick Gunter
rator. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Jeffrey Mattox Gesendet: Donnerstag, 26. Jänner 2017 11:03 An: SQLite mailing list Betreff: [sqlite] text/numeric comparison confusion When used in a SELECT, I expect this comparison to be t

Re: [sqlite] text/numeric comparison confusion

2017-01-26 Thread David Raymond
ompared to none -> the none becomes text) (Please correct me if I'm mixed up) -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: Thursday, January 26, 2017 10:50 AM To: SQLite mailing list Subject: Re: [sqlite] t

Re: [sqlite] text/numeric comparison confusion

2017-01-26 Thread Richard Hipp
On 1/26/17, Jeffrey Mattox wrote: > When used in a SELECT, I expect this comparison to be true (and it is): >( cast('25' as INTEGER) = 25 ) <--- true > > But, why is this false: >( '25' = 25 ) <--- false? > > and this is true: >( cast(25 as TEXT) = 25 ) <--- true > > So, being that

[sqlite] text/numeric comparison confusion

2017-01-26 Thread Jeffrey Mattox
When used in a SELECT, I expect this comparison to be true (and it is): ( cast('25' as INTEGER) = 25 ) <--- true But, why is this false: ( '25' = 25 ) <--- false? and this is true: ( cast(25 as TEXT) = 25 ) <--- true So, being that second comparison is false (why?), then why isn't th