No subject
Fri Apr 24 23:03:44 HKT 2009
bles) are just convenience functions that create SQL.
From: http://sqlite.org/sqlite.html
<quote>
The ".tables" command is similar to setting list mode then executing the fo=
llowing query:
SELECT name FROM sqlite_master=20
WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%'
UNION ALL=20
SELECT name FROM sqlite_temp_master=20
WHERE type IN ('table','view')=20
ORDER BY 1
In fact, if you look at the source code to the sqlite3 program (found in th=
e source tree in the file src/shell.c) you'll find exactly the above query.
</quote>
Might be worthwhile looking up the C source for ".import" and working out w=
hat SQL it is creating.
=20
> The commands I'm using are
>=20
> .database cpredik.sqlite
> .separator "|"
> .import Predik.csv predik
> .exit
>=20
> 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.
>=20
> 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?
>=20
> Thanks,
>=20
> Bill
>=20
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list