in reply to Compound Sql Statement
The sql is generic enough... Perhaps this would work better for you:
my $sql = "Insert into tableone values('1', '2', '3')"; my $nextsql = "Insert into tabletwo values('4', '5', '6')"; my $lastsql = "Insert into tablethree values('7', '8', '9')"; my $loadHandle = $dbh->prepare("$sql; $nextsql; $lastsql;"); $loadHandle->execute or die "Could not execute SQL statement ... maybe invalid?"; ....
even better:
my $sql = <<EO_SQL; insert into tableone values('1', '2', '3') insert into tabletwo values('4', '5', '6') insert into tablethree values('7', '8', '9') EOF_SQL my $loadHandle = $dbh->prepare($sql); $loadHandle->execute or die "Could not execute SQL statement $sql ... maybe invalid?"; ....
Jason L. Froebe
No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compound Sql Statement
by Doyle (Acolyte) on Feb 25, 2005 at 15:09 UTC | |
by sgifford (Prior) on Feb 25, 2005 at 15:14 UTC |