(echo .separator "||"; echo .import path tbl) | sqlite3 dbfile .... worked perfectly. Thank you Clemens, Stephan and Simon for the ideas. I learned a bunch of new things today.
John On Thu, Oct 10, 2013 at 10:18 AM, Clemens Ladisch <clem...@ladisch.de>wrote: > John wrote: > > I am having problems creating a "do shell script" command which includes > > both the import command and the insert command. The reason they need to > be > > combined is that the shells instance ends with the command. > > > > do shell script ("sqlite3 " & databasePath & " .separator \"||\" ; > .import path/to/csv Main") > > Dot commands are not SQL commands; they must be separated by newlines. > > If you cannot generate newline characters, try to execute something > like this: > > (echo .separator "||"; echo .import path tbl) | sqlite3 dbfile > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users