in reply to Recoding a multi-sql-statement storedProc transaction in a script

What exactly is it that you find burdensome about this? I can't imagine any other way of doing it. Is it just the prepare/execute steps? There are DBI shortcuts for that.
  • Comment on Re: Recoding a multi-sql-statement storedProc transaction in a script

Replies are listed 'Best First'.
Re^2: Recoding a multi-sql-statement storedProc transaction in a script
by punkish (Priest) on Dec 14, 2004 at 23:21 UTC
    > What exactly is it that you find burdensome about this?... Is it just the prepare/execute steps?
    Yup. On the other hand, if you
    > can't imagine any other way of doing it
    then that is the answer I was looking for. If there is no other way, then I will just write it up. Thanks for the info.

      A shortcut for a prepare/execute pair is the do method, which will save you some typing.

      If you can figure out a way to take your original block of code and turn it into seperate SQL statements, Perl is quite good at that sort of thing. For example if statements are seperated by blank lines or semicolons, you could use split to get the list of statements to execute.