在iPhone上将CSV文件读入sqlite3

时间:2022-01-28 23:51:57

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

有没有办法在iPhone上将CSV文件读入sqlite3 ?是否有类似于SQL命令的sqlite3功能?

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?

或者,有没有一种方法可以将CSV文件转换成sqlite3可以自动读取的格式,而iPhone会在应用程序中显示出来?

2 个解决方案

#1


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

你可以用Core Data读取CSV和其他文件到你的DB中,但我不认为这会对你有帮助,因为听起来你已经开始使用Sqlite开发了

#2


1  

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

你可以试试firefox的“SQLITE MANAGER”,它有一个从CSV导入数据的选项。

SQLITE Manager for FireFox

SQLITE经理火狐

#1


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

你可以用Core Data读取CSV和其他文件到你的DB中,但我不认为这会对你有帮助,因为听起来你已经开始使用Sqlite开发了

#2


1  

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

你可以试试firefox的“SQLITE MANAGER”,它有一个从CSV导入数据的选项。

SQLITE Manager for FireFox

SQLITE经理火狐