I've got a process that starts with a J script to pull many spreadsheets
into one csv file and then uses a file of sql commands that sqlite3
executes in cygwin bash to populate a database.  I'd like to run
everything from J and, in the process, lose the dependency on cygwin.

I'm stuck on running the sql to populate the database.  It contains a few
dot commands for sqlite3, and exec__db seems to choke on those.

The commands I'm using are

.database cpredik.sqlite
.separator "|"
.import Predik.csv predik
.exit

The first and last are a bit superfluous in the J context, but they are
there to keep sqlite3 happy when run from the shell.  The middle two could
probably be replaced with a bulkins, but then that wouldn't be compatible
with sqlite3.

Is there a way to have this one .sql file that will run both with sqlite3
from the shell (bash) and inside J using exec__db?

Thanks,

Bill

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to