in reply to SQL with DBI
As CountZero described above it is easier to use a foreach-loop. You don't need a statement-handle to drop tables (see DBI for more details). And you can use the qw-quoting operator to quote the tables in your array. The code above is untested but should be okay.my @tables_to_drop = qw(Grab_Addr2 Grab_MCC1 Grab_MCC2); foreach my $table (@tables_to_drop) { $dbh->do("DROP TABLE $table;") or die $dbh->errstr(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SQL with DBI
by sk (Curate) on Jun 26, 2005 at 20:45 UTC | |
by VSarkiss (Monsignor) on Jun 27, 2005 at 15:30 UTC | |
|
Re^2: SQL with DBI
by Anonymous Monk on Jun 26, 2005 at 19:15 UTC |