Re: Can't Bulk Load CSV with blank fields
Posted by: Michael Cooke-Russell
Date: February 17, 2016 04:03PM

Unfortunately I have no control over the generation of the CSV files - they are provided to us on a daily basis by an external organisation. Having to preprocess the text files just to have blanks interpreted as NULL rather than 0 is so inefficient. Looking around various forums I see that this problem has been around for many years without a real solution.

I've now also tried using LOAD DATA INFILE statements in stored procedures. But unfortunately MySQL does not permit that either. It's like I'm being deliberately thwarted at every turn to try and get this data into my database!

I realise it's not a "bug". But then again why should a blank field really be interpreted as a 0 - particularly if the default value for a field has been defined as NULL?

Options: ReplyQuote

Written By
Re: Can't Bulk Load CSV with blank fields
February 17, 2016 04:03PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.