in reply to Re^4: Database copy table with DBI
in thread Database copy table with DBI

I do not get that duplicate error when I use the code below, do you know why?

Probably because you are not inserting any records having retrieved them all in the first while loop. What are the PrintError and RaiseError settings for the dbh2 handle ?

poj

Replies are listed 'Best First'.
Re^6: Database copy table with DBI
by cbtshare (Monk) on Nov 16, 2016 at 03:56 UTC
    performs basic automatic error reporting with DBI
      I think poj didn't ask what they are for, but what they are, i.e. "what values do they have in your script" concerning (a.k.a. "for") the $db2 handle?