-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/11/2015 12:24 PM, tonyp at acm.org wrote: > It?s a real nuisance to have to edit out the headers every time, > especially when the files are very large and they do not load fast > (or at all) into a text editor. Plus, it?s semi-automatic.
I suggest you use a simpler way. Create a temporary table and do the .import into that. You can then copy that table into your desired one: BEGIN CREATE TEMPORARY TABLE temptable .....; .import log.csv temptable INSERT INTO desired SELECT * from temptable; COMMIT You can explicitly delete the temp table, or it will automatically go away when you close the connection. The advantage of this approach is you can do processing on the temporary table (eg convert nulls to empty string or vice versa, drop header row), add a column (eg import date), have different columns and/or names between the two (adjust the INSERT/SELECT statement) etc. This will all work from the shell, requires no programming, and will import just as fast. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVRVTYACgkQmOOfHg372QREYwCePcN1Z5RauOs7lo4jvtLNyx+t 018AnRJpES+JhBR5kM3+7m4Fa2p1I9t6 =oss6 -----END PGP SIGNATURE-----