Jonathan Mangin wrote:

I would like to select several rows from one table
and insert them into another nearly identical table
using Perl/DBI:

my @array = $q->param();  # HTML checkboxes

foreach my $element (@array) {

$dbh->do("INSERT INTO t (col1, ...) SELECT col1, ... FROM t2 WHERE x = '$element'");
}




--
END
-----------------------------------------------------------------------------
Philip M. Gollucci
Senior Developer - Liquidity Services Inc.
Phone:  202.558.6268 (Direct)
E-Mail: [EMAIL PROTECTED]
Web:    http://www.liquidation.com



Reply via email to