Read CSV file into sqlite3 on the iPhone

2019-03-31 21:44发布

问题:

Is there a way to read a CSV file into sqlite3 on the iPhone? Is there sqlite3 functionality similar to the SQL commands

LOAD DATA LOCAL INFILE 'file.csv' INTO TABLE TABLENAME FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n';

Or is there an approach that converts the CSV file into a format that sqlite3 can read automatically which the iPhone brings up the application?

回答1:

You can read CSV and other files into your DB using Core Data but I dont think that is going to help you as it sounds like you have started developing using Sqlite



回答2:

you can try the firefox addon "SQLITE MANAGER" wich has an option to import data from CSV.

SQLITE Manager for FireFox