-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Oleg Kobchenko <[EMAIL PROTECTED]> writes:
> SQLite Addon for J
Cool! Thanks, Oleg (I'm finally getting around to trying it, because
I was recently in need of a DBMS).
Just a couple of questions:
It would be nice to have the ability of a sqlite3 .dump command. I
tried downloading and running sqlite-3_3_17.zip, but it can't open the
database. Is that likely because the addon is based on 3.3.7? Are
there any plans either to update the addon sqlite.dll soon? I presume
it's not as simple as just grabbing a file off the SQLite site --
there are, no doubt, changes in the addon, too, right?
Are there any plans to implement some of the sqlite3 functionality in
the browser? Is there a way to do that already? I do see the Save As
command has the tantalizing .ddl and .sql suffix selections, but I
always end up with empty files when I try that.
In just scattered times over the last day, I've gotten quite a bit of
use out of J scripts to select data. My next step is to write a command
(J+SQL or pure SQL) to add data to related tables. For example,
create table A (
AID integer primary key autoincrement,
ANAME varchar(45) not null);
create table B (
BID integer primary key autoincrement,
BNAME varchar(45) not null,
AID integer,
foreign key (AID) references A (AID) );
It's easy to insert into either table alone. What I want to do is to
insert a new ANAME - BNAME pair, roughly corresponding to
select AID from A where ANAME = 'MyAValue'
if that returns nothing, then
insert into A (ANAME) values ('MyAValue')
insert into B (BNAME, AID) values ('MyNewBName', the AID from
the previous insert
else
insert into B (BNAME, AID) values ('MyNewBName' the AID from
the first select
I've found a number of SQL tutorials online, but I haven't seen this
example worked out. Any pointers to places that address this?
Thanks,
Bill
- --
Bill Harris http://facilitatedsystems.com/weblog/
Facilitated Systems Everett, WA 98208 USA
http://facilitatedsystems.com/ phone: +1 425 337-5541
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: For more information, see http://www.gnupg.org
iD8DBQFGYLro3J3HaQTDvd8RAt2FAJ9Gt8NSfNtfAwe9feXAfDcE/vl+4wCeJxo/
1lHYgIcy09ssEHBVc2foCm0=
=NRO+
-----END PGP SIGNATURE-----
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm