in reply to Compound Sql Statement

  1. Have you tried your code? If you have, what error(s) did you run into?
  2. Your code does not compile as written. Your double-quotes aren't doing what you think they're doing. Did you cut'n'paste or retype?
  3. Not every database can handle multiple SQL statements. Not every DBD can handle multiple SQL statements, even if the database can. What database are you using?

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^2: Compound Sql Statement
by Doyle (Acolyte) on Feb 25, 2005 at 14:39 UTC
    I have tried the statements and get an error stating, "Can't call method "execute" on an undefined value". I assembled the sql by looking at examples. I am using an access database.
      Check if your prepare method call fails, and if so, see what the error is:
      my $loadHandle = $dbh->prepare("$sql; $nextsql; $lastsql") or die "Couldn't prepare statement: ",$dbh->errstr,"\n";