On 9 Dec 2010, at 11:04pm, Ryan Johnson wrote:

> I'm a new user to sqlite (I just compiled sqlite-autoconf-3070400 on 
>       ), and am running into what seems to be a bad interaction between 
> type affinity and integer comparisons.
> 
> I'm importing a csv file full of single-digit integer values into a 
> table which .schema reports as "CREATE TABLE numbers(num INTEGER);"

Can you confirm that you are using the '.import' command from command-line tool 
to do this ?

In your source .csv file, are the digits alone on their line or are they 
surrounded by single or double quotes ?

If you perform the same process in the version of Windows you're running cygwin 
in, do you get the same result ?  (Don't worry as much about answering this 
question.)

> As far as I can understand from the documentation, the imported values 
> can be losslessly and reversibly converted to INTEGER, but comparison 
> operations (=, in, natural join) against other integers fail until I do 
> "UPDATE numbers SET num=0+num;"
> 
> Is this working as designed and I'm missing something obvious about the 
> type system, or is this a bug?

Your post does suggest something is wrong, but it'll help if you provide some 
of the above details.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to