I'm just starting out in SQLite and have run into my first error.
What I'm trying to do is to create a table in my database with data from a text file, but I get these errors saying:
Error: near line 4: no such column: ’Microsoft’
Error: near line 5: no such column: ‘Apple’
Error: near line 6: no such column: ‘Youtube’
Error: near line 7: no such column: ‘Facebook’
My text file looks like this, I just manipulated a previously created table:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE stockprices (id integer primary key, price text);
INSERT INTO "stockprices" VALUES(22,’Microsoft’);
INSERT INTO "stockprices" VALUES(33,‘Apple’);
INSERT INTO "stockprices" VALUES(55, ‘Youtube’);
INSERT INTO "stockprices" VALUES(44, ‘Facebook’);
COMMIT;
And I get these errors by using the command:
.read ./Documents/sqlite3Files/stockprices.sql
I was under the impression that you could just create a new table from a already saved one?
Any suggestions on how to do this correctly would be appreciated.