in reply to Skip problematic lines while populating database

You haven't given any indication of what sort of errors you're getting. Are these genuinely bad lines in the input data, or is it merely that by not using Text:CSV and placeholders, your code isn't correctly handling and quoting data fields and thus converting good data into bad SQL?

Dave.

  • Comment on Re: Skip problematic lines while populating database

Replies are listed 'Best First'.
Re^2: Skip problematic lines while populating database
by Anonymous Monk on Aug 17, 2020 at 17:47 UTC
    Hi all and thank you for the suggestions. I am not so experienced with Perl + DBs, so I need to look a bit more in what you suggest me to do.
    The errors I am referring to are SQL insert error, due to bad input, e.g. a string is being inserted into a field that only accepts dates. So then what I get is an error and the code stops to execute, whereas I would like to just throw away this line to a log file and continue with as many lines are good to be inserted.