http://www.perlmonks.org?node_id=1030437


in reply to Re: Using DBI to extract from 2 databases
in thread Using DBI to extract from 2 databases

Your code is a little messy
is an understatement similar in magnitude to
the Titanic has hit a little iceberg and has a tiny hole in it
:-)

If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P
  • Comment on Re^2: Using DBI to extract from 2 databases

Replies are listed 'Best First'.
Re^3: Using DBI to extract from 2 databases
by marto (Cardinal) on Apr 24, 2013 at 15:48 UTC

    It's hardly this disaster you liken it to. With the advice given and a few minutes the existing code could be made less messy. Most DB issues would be caught by enabling RaiseError, advice has been given (in a previous thread also) on place holders, redundant variables would identified and easily resolved.

    With this out of the way OP can concentrate on the bigger issues which have been highlighted by resolving these trivial problems. Hopefully the exercise of cleaning this up would help with learning why such things are important, and how to think about approaching problems like this in future.

      Yes, I know - I gave an answer to try and resolve most of the issues below. My "titanic" response was just me succumbing to the Dark Side... :-)

      If any of my proposed solutions have minor errors, it's because I don't waste my genius on trivial matters. :-P