Submitted by Kiran on Sun, 02/15/2009 - 09:11
I am using SQLite build-in import command for importing records from text files.
The code being follows:
$ sqlite3 dbname.db SQLite version 3.1.3 Enter ".help" for instructions sqlite> .separator "\t"
Once I have set the field separator, I do import:
sqlite> .import filename.txt tablename
This solves my purpose but have any one tried on any user-defined function to import data to sqlite.
»
- 2150 reads













I have come across a CSV reading module in Tcllib, u can give it a try, it will take care of the quotes and other nastiness.
You can use tksqlite application available for download at:
http://reddog.s35.xrea.com/wiki/TkSQLite.html
It is the best free tool for working with sqlite.
For sqlite I use the mode command, the codes is like this:
The mode command automatically choose the default separator.
I hope you are going in right way, but instead you can fire a
system call to execute the same command:
this one line is enough then any user-defined function.
Post new comment