> Perhaps the fact that my column definitions declared no
> typing has an effect here?

Yes, that means that your columns have no affinity, all data stored in
it as you give and no conversions done during insertions and
comparisons:

sqlite> create table t (n, t);
sqlite> insert into t values (1, '3');
sqlite> select * from t where n = 1;
1|3
sqlite> select * from t where n = '1';
sqlite>

Everything is well described at http://www.sqlite.org/datatype3.html
and link there goes even from http://www.sqlite.org/version3.html
which I presume you've already seen.


Pavel

On Thu, Sep 3, 2009 at 8:44 AM, Rod Dav4is<dav...@yahoo.com> wrote:
> Pavel Ivanov wrote:
>>>>>   2. *Quotes in SELECT*: Specification of Field='3' failed to find
>>>>>      hits; Field=3 (i.e. without quotes) was required.
>>>>>
>>> This is a feature, not a bug.  SQLite 3.x distinguishes between
>>> integers and strings and does not consider them equal to one another.
>>> You might have some rows where Field='3' and different rows where
>>> Field=3 and SQLite will distinguish between them.
>>>
>>
>> BTW, I've re-read documentation about this, felt that something wrong
>> here, tried it out and saw that your (Rod) complaint is wrong in this
>> particular case:
>>
>> sqlite> create table t (n integer, t text);
>> sqlite> insert into t values (1, '3');
>> sqlite> select * from t;
>> 1|3
>> sqlite> select * from t where n = 1;
>> 1|3
>> sqlite> select * from t where n = '1';
>> 1|3
>> sqlite> select * from t where t = '3';
>> 1|3
>> sqlite> select * from t where t = 3;
>> 1|3
>> sqlite> select * from t where +n = '1';
>> sqlite>
>>
>>
>> Pavel
>>
> I know what I saw: I had to change some of my selects, removing single
> quotes from literals, in order for selects to have the same result as on
> version 2. Perhaps the fact that my column definitions declared no
> typing has an effect here?
>
> -R.
>
> --
> Regards, Rod Dav4is / P.O. Box 118 / Hyde Park, NY 12538 / USA
> Genealogy, et Cetera: http://freepages.rootsweb.ancestry.com/~dav4is/
> 538 ancestral & collateral families, mostly 17°-19° century
> New England & European roots. Total population: 136,000+
> Annex: http://www.gencircles.com/users/dav4is/
> email: dav...@yahoo.com
> A Democrat, a Republican and a giraffe walk into a bar. The
> bartender looks up from his want ads and says, "What is this, a joke?"
> -unknown
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to