Re: [sqlite] .import FILE TABLE

2011-03-11 Thread jciliberti
Thank you, thank you, thank you. 



- Original Message - 
From: "Jim Morris" <jmor...@bearriver.com> 
To: sqlite-users@sqlite.org 
Sent: Thursday, March 10, 2011 2:40:34 PM 
Subject: Re: [sqlite] .import FILE TABLE 

.separator "," 
.import myPath/myCSVfile myTable 

We use a "import" file with these commands. 


On 3/10/2011 2:32 PM, jcilibe...@comcast.net wrote: 
> Thanks, but doesn't seem to work: 
> 
> 
> I used command> 
> - Original Message - 
> From: "Gerry Snyder"<mesmerizer...@gmail.com> 
> To: "General Discussion of SQLite Database"<sqlite-users@sqlite.org> 
> Sent: Thursday, March 10, 2011 12:39:33 PM 
> Subject: Re: [sqlite] .import FILE TABLE 
> 
> On 3/10/2011 1:28 PM, jcilibe...@comcast.net wrote: 
>> Hello, thanks but adding separator "," doesn't seem to work. 
> 
> I tried the following commands: 
>> .import separator "," myPath/myCSVfile myTable 
>> . import separator , myPath/myCSVfile myTable 
>> . import myPath/myCSVfile myTable separator , 
>> . import myPath/myCSVfile myTable separator "," 
> 
> None worked: any ideas? Examination of the myCSVfile.txt shows [1, "Jack", 
> "Sammamish"] 
>> 
>> Unbelievably active user group! 
>> 
>> 
>> I have been unable to import a CSV text file from MS Access to sqlite: 
>> 1. Created a small table (3 fields and 1 record) in Access and exported it 
>> to a CSV text file named "myCSVfile.txt" 
>> 
>> 
>> 2. Transferred from PC to Mac. Opened file "myCSVfile.txt" ...looks OK eg: 
>> [1, "Jack", "Sammamish"] 
>> 
>> 
>> 3. Created a new DB ("myDB") and table ("myTable") in SQLite Database 
>> Browser eg: [ID:primaryKey Name:text City:text] 
>> 
>> 
>> 4. Opened the DB in terminal with> sqlite myPath/myDB 
> Does adding the line: 
> 
> .separator "," 
> 
> help? 
> 
>> 5. Entered command> .import myPath/myCSVfile myTable 
>> 
>> 
>> Always get back message: "line 1: expected 3 columns of data but found 1" 
>> 
>> 
>> Help! I've read many archived posts...so I know this should work. 
>> ___ 
>> 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 
> ___ 
> 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 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Jim Morris
.separator ","
.import myPath/myCSVfile myTable

We use a "import" file with these commands.


On 3/10/2011 2:32 PM, jcilibe...@comcast.net wrote:
> Thanks, but doesn't seem to work:
>
>
> I used command>
> - Original Message -
> From: "Gerry Snyder"<mesmerizer...@gmail.com>
> To: "General Discussion of SQLite Database"<sqlite-users@sqlite.org>
> Sent: Thursday, March 10, 2011 12:39:33 PM
> Subject: Re: [sqlite] .import FILE TABLE
>
> On 3/10/2011 1:28 PM, jcilibe...@comcast.net wrote:
>> Hello, thanks but adding separator "," doesn't seem to work.
>
> I tried the following commands:
>> .import separator "," myPath/myCSVfile myTable
>> . import separator , myPath/myCSVfile myTable
>> . import myPath/myCSVfile myTable separator ,
>> . import myPath/myCSVfile myTable separator ","
>
> None worked: any ideas? Examination of the myCSVfile.txt shows [1, "Jack", 
> "Sammamish"]
>>
>> Unbelievably active user group!
>>
>>
>> I have been unable to import a CSV text file from MS Access to sqlite:
>> 1. Created a small table (3 fields and 1 record) in Access and exported it 
>> to a CSV text file named "myCSVfile.txt"
>>
>>
>> 2. Transferred from PC to Mac. Opened file "myCSVfile.txt" ...looks OK eg: 
>> [1, "Jack", "Sammamish"]
>>
>>
>> 3. Created a new DB ("myDB") and table ("myTable") in SQLite Database 
>> Browser eg: [ID:primaryKey Name:text City:text]
>>
>>
>> 4. Opened the DB in terminal with>  sqlite myPath/myDB
> Does adding the line:
>
> .separator ","
>
> help?
>
>> 5. Entered command>  .import myPath/myCSVfile myTable
>>
>>
>> Always get back message: "line 1: expected 3 columns of data but found 1"
>>
>>
>> Help! I've read many archived posts...so I know this should work.
>> ___
>> 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
> ___
> 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


Re: [sqlite] .import FILE TABLE

2011-03-10 Thread jciliberti
Thanks, but doesn't seem to work: 


I used command > 
- Original Message - 
From: "Gerry Snyder" <mesmerizer...@gmail.com> 
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> 
Sent: Thursday, March 10, 2011 12:39:33 PM 
Subject: Re: [sqlite] .import FILE TABLE 

On 3/10/2011 1:28 PM, jcilibe...@comcast.net wrote: 
> Hello, thanks but adding separator "," doesn't seem to work. 


I tried the following commands: 
> .import separator "," myPath/myCSVfile myTable 
> . import separator , myPath/myCSVfile myTable 
> . import myPath/myCSVfile myTable separator , 
> . import myPath/myCSVfile myTable separator "," 


None worked: any ideas? Examination of the myCSVfile.txt shows [1, "Jack", 
"Sammamish"] 
> 
> 
> Unbelievably active user group! 
> 
> 
> I have been unable to import a CSV text file from MS Access to sqlite: 
> 1. Created a small table (3 fields and 1 record) in Access and exported it to 
> a CSV text file named "myCSVfile.txt" 
> 
> 
> 2. Transferred from PC to Mac. Opened file "myCSVfile.txt" ...looks OK eg: 
> [1, "Jack", "Sammamish"] 
> 
> 
> 3. Created a new DB ("myDB") and table ("myTable") in SQLite Database Browser 
> eg: [ID:primaryKey Name:text City:text] 
> 
> 
> 4. Opened the DB in terminal with> sqlite myPath/myDB 

Does adding the line: 

.separator "," 

help? 

> 
> 5. Entered command> .import myPath/myCSVfile myTable 
> 
> 
> Always get back message: "line 1: expected 3 columns of data but found 1" 
> 
> 
> Help! I've read many archived posts...so I know this should work. 
> ___ 
> 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 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Gerry Snyder
On 3/10/2011 1:28 PM, jcilibe...@comcast.net wrote:
> Hello,
>
>
> Unbelievably active user group!
>
>
> I have been unable to import a CSV text file from MS Access to sqlite:
> 1. Created a small table (3 fields and 1 record) in Access and exported it to 
> a CSV text file named "myCSVfile.txt"
>
>
> 2. Transferred from PC to Mac. Opened file "myCSVfile.txt" ...looks OK eg: 
> [1, "Jack", "Sammamish"]
>
>
> 3. Created a new DB ("myDB") and table ("myTable") in SQLite Database Browser 
> eg: [ID:primaryKey Name:text City:text]
>
>
> 4. Opened the DB in terminal with>  sqlite myPath/myDB

Does adding the line:

.separator ","

help?

>
> 5. Entered command>  .import myPath/myCSVfile myTable
>
>
> Always get back message: "line 1: expected 3 columns of data but found 1"
>
>
> Help! I've read many archived posts...so I know this should work.
> ___
> 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


Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Jim Morris
Make sure your separator is the ","
http://www.sqlite.org/sqlite.html

On 3/10/2011 12:28 PM, jcilibe...@comcast.net wrote:
> Hello,
>
>
> Unbelievably active user group!
>
>
> I have been unable to import a CSV text file from MS Access to sqlite:
> 1. Created a small table (3 fields and 1 record) in Access and exported it to 
> a CSV text file named "myCSVfile.txt"
>
>
> 2. Transferred from PC to Mac. Opened file "myCSVfile.txt" ...looks OK eg: 
> [1, "Jack", "Sammamish"]
>
>
> 3. Created a new DB ("myDB") and table ("myTable") in SQLite Database Browser 
> eg: [ID:primaryKey Name:text City:text]
>
>
> 4. Opened the DB in terminal with>  sqlite myPath/myDB
>
>
> 5. Entered command>  .import myPath/myCSVfile myTable
>
>
> Always get back message: "line 1: expected 3 columns of data but found 1"
>
>
> Help! I've read many archived posts...so I know this should work.
> ___
> 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


[sqlite] .import FILE TABLE

2011-03-10 Thread jciliberti
Hello, 


Unbelievably active user group! 


I have been unable to import a CSV text file from MS Access to sqlite: 
1. Created a small table (3 fields and 1 record) in Access and exported it to a 
CSV text file named "myCSVfile.txt" 


2. Transferred from PC to Mac. Opened file "myCSVfile.txt" ...looks OK eg: [1, 
"Jack", "Sammamish"] 


3. Created a new DB ("myDB") and table ("myTable") in SQLite Database Browser 
eg: [ID:primaryKey Name:text City:text] 


4. Opened the DB in terminal with > sqlite myPath/myDB 


5. Entered command > .import myPath/myCSVfile myTable 


Always get back message: "line 1: expected 3 columns of data but found 1" 


Help! I've read many archived posts...so I know this should work. 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] .import FILE TABLE

2010-08-11 Thread Oliver Peters
Larry Siden  writes:

> 
> What is the format of the file?  I cannot find it documented anywhere.

It is a csv file with the same fields in the same order as your table has.

You can set the separator of the csv this way

.separator \t

(\t == tab, default is |)

Oliver



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


[sqlite] .import FILE TABLE

2010-08-10 Thread Larry Siden
What is the format of the file?  I cannot find it documented anywhere.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users