Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Keith Medcalf
The comparison is between a column with "numeric" (integer) affinity and a text value with no affinity. The text value is an empty string. Affinity conversion would attempt to convert the text value with no affinity into a numeric value (0) IF AND ONLY IF the conversion is lossless and

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Norman Dunbar
Ok, thanks everyone, it's perfectly clear now. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Simon Slavin
On 19 Aug 2018, at 7:56pm, Warren Young wrote: > On Aug 19, 2018, at 10:03 AM, Norman Dunbar wrote: > >> Duck Typing? Never heard that before. > > It’s a pretty common term of art in the software development world: > > https://en.wikipedia.org/wiki/Duck_typing That article was written 20

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Warren Young
On Aug 19, 2018, at 10:03 AM, Norman Dunbar wrote: > > Duck Typing? Never heard that before. It’s a pretty common term of art in the software development world: https://en.wikipedia.org/wiki/Duck_typing ___ sqlite-users mailing list

Re: [sqlite] questions

2018-08-19 Thread Balaji Ramanathan
> >2. questions (am...@juno.com) > From: "am...@juno.com" > To: sqlite-users@mailinglists.sqlite.org, am...@juno.com > Cc: > Bcc: > Date: Sat, 18 Aug 2018 16:24:45 GMT > Subject: [sqlite] questions > August 18, 2018 Good Morning Good People: I am in the process of building > a database for

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Norman Dunbar
Duck Typing? Never heard that before. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity and any "auto corrections" that are just wrong! ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread R Smith
On 2018/08/19 8:58 AM, 麦轲数据管家 wrote: create table t1(c int); insert into t1 values (1),(2),(3); select * from t1 where c>'' ; --get nothing(empty result) select * from t1 where c<''; --get result set:1,2,3 create table t2(c char); insert into t2 values (1),(2),(3); select * from t2 where

Re: [sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread Abroży Nieprzełoży
It's documented behaviour. https://www.sqlite.org/datatype3.html#comparisons 2018-08-19 8:58 GMT+02:00, 麦轲数据管家 : > create table t1(c int); > insert into t1 values (1),(2),(3); > select * from t1 where c>'' ; --get nothing(empty result) > select * from t1 where c<''; --get result set:1,2,3 >

[sqlite] bug: compare number with empty string get different resut

2018-08-19 Thread ????????????
create table t1(c int); insert into t1 values (1),(2),(3); select * from t1 where c>'' ; --get nothing(empty result) select * from t1 where c<''; --get result set:1,2,3 create table t2(c char); insert into t2 values (1),(2),(3); select * from t2 where c>'';--get correct result set: