> Is there some way to load a ".csv" file into a SQLite database table > when the first row (record) of the file contains headers? > > This does not work? > ---------------------------------------------- > .separator , > .import test.csv ld_assay > > Here's my database / table: > CREATE TABLE [ld_assay] ( > [id] INTEGER PRIMARY KEY, > [barcode_id] NCHAR(9), > [light] BOOLEAN, > [bpm] REAL); > > Here's my "test.csv": > id,barcode_id,light,bpm > 1,000002455,1,180.2 > 2,000002455,1,168.3 > 3,000002455,1,189.4
I'm pretty sure MyJSQLView will do this for you. Been a while since I tested it it, but it should use the first line to compose a SQL insert statement that only adds the columns specified. Left out columns should take default values. Since MyJSQLView is a Java based GUI the Zentus's SQLite JDBC must be used as the commnuncation interface to the SQLite database file. Add it to your java/lib/ext directory to have it loaded automatically. danap. MyJSQLView http://myjsqlview.org SQLite JDBC http://www.xerial.org/trac/Xerial /wiki/SQLiteJDBC#WhatisdifferentfromZentussSQLiteJDBC _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users