I am importing data from a CSV file into a SQLServer database via SSIS. I have a problem with string columns, in that SSIS inserts an empty string (eg. "") for a null column (eg ,,) by default. I can of course select the "retain null values" option in the Flat File Source Editor, however when I do this, it then treats zero-length strings (eg. "") as null as well as empty columns (eg ,,). My desired behaviour for string columns is below:
CSVDatabase
,,NULL
""""
Basically I'd like to know if there is a way of handling this distinction without resorting to derived columns, as I have 79 tables to process, each with multiple string columns so I'd really rather avoid that option.
Thanks for your help!