i'll go right to the point. my code is this:
up tu here everything is going fine, it connects to the database nr1.db , creates a table GITAXNR(gi,ID,quest), inserts into it all queried valeus ... ta, ta, ta,...use DBI; ... $self->connectdb(connection => "./db/nr1.db"); $self->createtable(table => $joinTable, form => $form1); my $insert = "insert into GITAXNR(gi,ID,quest) select GITAX.gi, GITAX. +ID, NRP.quest from GITAX inner join NRP on GITAX.gi = NRP.gi"; $self->do_it(argument => $insert);
here the problems start. when i use just the sqlite engine and attach databases the query :for(my $j = 1; $j<=4; $j++){ unless($j == 1){ my $database = "attach database './db/nr$j.db' as nrdb$j"; $self->do_it(argument => $database); my $insert = "insert into GITAXNR(gi,ID,quest) select GITAX.gi +, GITAX.ID, NRP.quest from GITAX inner join nr$j.NRP on GITAX.gi = NR +P.gi"; $self->do_it(argument => $insert); } }
works perfectly. but when i incorporate it into the code it complains that there is no nr$j (nr2) database (DBD::SQLite::db prepare failed: no such table: nr2.NRP(1) at dbdimp.c line 271 a t Lib/NRDB/NrDBI.pm line 70, <NRLOG> line 15.)insert into GITAXNR(gi,ID,quest) select GITAX.gi, GITAX.ID, NRP.quest +from nr1.GITAX inner join nr2.NRP on GITAX.gi = NRP.gi
so the problem is obviously in attaching or querying the attached databases. so if anyone has an idea on how to do this...
i looked through SQLite module and i couldn't find anything useful
suggestions ... ?
thank you !
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |