iPhone, iPod touch, iPad tutorials, examples and sample code. Come and get it!

Thursday, January 12, 2012

SQLite import from .csv file

Here are the quick and easy steps to import the contents of a .csv file into your SQLite3 database.

Open the db via the command line:
sqlite3 myDatabaseName

Enter the following commands:
.separator ","
.import myFile.csv tblMyTable

And that's it.  If your .csv file has a different separator character, just replace the comma with your character.

« Older Entries  
Newer Entries »