I want it to return the output from the SQL queries to the result file(s).foreach (@SQL_queries) { my $Get_results = $_; my $sth_atl = $dbh->prepare($Get_results) or die "Couldn't prepare + query: ".$dbh->errstr; $sth_atl->execute() or die "Couldn't execute query: ".$sth_atl->er +rstr; my $cols_for_row_B; while ($cols_for_row_B = $sth_atl->fetchrow_array) { local $" = "\t"; print OUTFILE $cols_for_row_B; print OUTFILE "\n"; } } undef @SQL_queries;
while ($cols_for_row_B = $sth_atl->fetchrow_array) { local $" = "\t"; print OUTFILE $_; print OUTFILE "\n"; }
In reply to returning rows using SQL + Perl DBI by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |