I'm trying to take a CSV file and create a sqlite3 database for the iPhone. 
The CSV file has 33K entries and is 2 MB.  The problem I am having is that
only about 1/10 of the database file gets written into the sqlite3 database.

I first translated the CSV file into SQL commands using the terminal-based
verison of sqlite3:

    % sqlite3
    sqlite> .mode csv
    sqlite> create table mydatabasetable (ITEM_ID INTEGER PRIMARY KEY,
FIELDA TEXT, FIELDB TEXT);
    sqlite> .import myfile.csv mydatabasetable
    sqlite> .output mydatabasetable.sql


Then I tried to create a sqlite3 database from the sql file:

    % sqlite3 mydatabasetable.sqlite < mydatabasetable.sql

When I read in mydatabasetable.sqlite into a sqlite3 database, only the
first 3400 entries out of 33,000 are in the database even though
mydatabasetable.sql has 33,000 unique insert commands.  

Am I following the correct approach to write out an sqlite database?  Is
there some default database filesize limit that I need to set?  Does anyone
know why only the first 3400 entries show up in the database?
-- 
View this message in context: 
http://www.nabble.com/translating-CSV-file-into-sqlite3-database-for-iPhone--tp24858168p24858168.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to