I have an SSIS Package that reads in data from a flat file and writes it to a sql server 2012 database. The data contains null values for some fields. I would like to retain the rows that have null values but replace them with default values without having to do a conversion on every column (there are hundreds of columns across a number of tables).
Are there any sql commands/scripts to update any null across a set of tables with a default based on datatype regardless of column? Alternatively, is there a way in SSIS 2012 to replace any null with a default value without a data conversion on each column?
For example, were I to have column “email” (varchar(255)) for customers where we had an email address. How can I then change each of those nulls to an empty string (‘’), but across hundreds of tables without specifying each one explicitly?
I have tried using a default value in the table definition, but it is still using NULL values since they are explicitly sent.