Pavel Ivanov wrote:
>> 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
>
>   
Yes, I know how it works. But that seems to contradict the 
documentation. The first field of the record inserted should have a type 
of numeric, as types are associated with the data not with the column 
declaration. So the phrase Where n = '1' should fall into the first 
bullet case, i.e.

    * When two expressions are compared, if expression A has INTEGER or
      REAL or NUMERIC affinity and expression B does not, then NUMERIC
      affinity is applied to the value of expression B before the
      comparison takes place.

(Reading "conversion is applied" for "affinity is applied".)
-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

Reply via email to