Hi Donald,

You're right. We're using a slightly modified build of sqlite3 at the 
company I work for, and it turns out that the problem is specific to our 
version. The "official" build of sqlite3 doesn't have this issue. Of 
course I should have tested the official binary first before jumping to 
conclusions.

Thanks for your reply.

- Danny


Griggs wrote:
>  Hi Danny,
>
> When you wrote "... and try to import it in SQLite..." 
> I'm pretty sure you were using the sqlite3 commandline utility.
>
> I ran your test using the sqlite3 utility version 3.5.5 and version
> 3.4.2 on Windows XP with your input file of:
>
> Unquoted value 1\tUnquoted value 2\r\n
> "Quoted" value 1\t"Quoted" value 2\r\n
>
>   (where \t=tab character, \r=return, and \n=newline)
>
> And in each case it imported without error and the data was as expected
> (the quotes were preserved as part of the data values).
>
> If you compiled sqlite3 yourself, I wonder if your difficulty my be an
> artifact of the libraries you linked in.
>
> Regards,
>   Donald
>
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Danny Suls
> Sent: Friday, July 04, 2008 5:04 AM
> To: [email protected]
> Subject: [sqlite] Importing tab-separated data containing quotes
>
> I'm having a problem importing tab-separated files containing quotes.
>
> For example:
>
> When I take a tab-separated text file (quote_test.txt), containing these
> lines...
> Unquoted value 1        Unquoted value 2
> "Quoted" value 1        "Quoted" value 2
>
> ... and try to import it in SQLite with these commands:
> create table quote_test (value1, value2); .separator \t .import
> quote_test.txt quote_test
>
> I get this error:
> quote_test.txt line 2: expected 2 columns of data but found 1
>
> ================================
>
>
> This email and any attachments have been scanned for known viruses using 
> multiple scanners. We believe that this email and any attachments are virus 
> free, however the recipient must take full responsibility for virus checking. 
> This email message is intended for the named recipient only. It may be 
> privileged and/or confidential. If you are not the named recipient of this 
> email please notify us immediately and do not copy it or use it for any 
> purpose, nor disclose its contents to any other person.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>   
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to