Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Skip problematic lines while populating database

by dave_the_m (Monsignor)
on Aug 17, 2020 at 17:33 UTC ( #11120844=note: print w/replies, xml ) Need Help??

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?


  • 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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120844]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-01-20 12:15 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.