Somebody, please help me, because my head going to explode.
I'm trying to import data in sqlite3. I have promos.sql and promos.csv files. I've tried to run this in the sqlite shell:
.read promos.sql
Or do this at a unix prompt:
sqlite3 development.sqlite3<promos.sqlite3
and each time I get error
Error: near line 1: near ",": syntax error Error: near line 18: near ",": syntax error e.t.c.
In file are following rows:
INSERT INTO promos (name, promo_type, category, phone, email, message, created_at) VALUES
('John', 1, 3, '+111 11 111 111 11', '[email protected]', 'Some message', '2009-09-24 12:17:17'),etc
so, it complains on error in each line where goes columns enumeration.
If I try
.import promos.csv promos
it says:
Error: promos.csv line 1: expected 9 columns of data but found 1
but in file are 9 columns as expected:
"13","John","1","3","+111 11 111 111 11","[email protected]","Some message","2009-09-24 15:17:17", "2009-09-24 15:17:17"
Why is it not working?