July 31st, 2011, 09:47 PM
Importing a csv file into SQLite at command line
Hello all. I hope this is the correct place to post this thread. I did not see an area for SQLite.
I have a pipe "|" delimited csv file that I am trying to import into a sqlite table but I keep getting the following error and not sure why. I would really appreciate any help.
"events.csv line 1: expected 20 columns of data but found 38"
I opened the csv file in notepad and everything looks fine. The following are my sqlite commands:
sqlite> create table fun (title varchar(50), location varchar(50), time varchar(10));
sqlite> .separator "|"
sqlite> .import events.csv fun