On 12/9/2010 4:10 PM, Simon Slavin wrote:
> 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 ?
Yes.
> In your source .csv file, are the digits alone on their line or are they 
> surrounded by single or double quotes ?
Naked.

Here's a small test case... it turns out I can't repro with only a 
single-column table:

$ cat > test.csv <<EOF
1,1
2,3
4,5
EOF
$ cat | sqlite3 test.db <<EOF
create table a(x,y INTEGER);
create table b(x,y INTEGER);
create table c(x,y INTEGER);
.separator ','
.import test.csv a
insert into b select * from a;
insert into c select x+0,y+0 from a;
select "a natural join b:";
select * from a natural join b;
select "a natural join c:";
select * from a natural join c;
select "END";
EOF

The output is:
> a natural join b:
> 1,1
> 2,3
> 4,5
> a natural join c:
> END

Thoughts? I can download the windows version if the above isn't enough.

Ryan

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

Reply via email to