Error inserting NULLs from a CSV file. -
03-07-2006
, 02:07 PM
I am trying to load data into a SS 2000 table from a CSV file using the
transform data task in DTS. There are several columns in the destination
table that don't allow NULLs, but they all have default values associated
with them. The source text file has NULLs for many of these non-nullable
columns.
Based on the books and help files that I've examined, I have kept "Keep NULL
values" unchecked on the Options tab of the Transform Data Task Properties.
As I understand it, checking this option will insert NULL values if they are
specified in the source; but leaving it unchecked will not attempt to insert
the NULLs, and will instead use the column defaults, if they are defined.
However, when I execute my package the default value for the column is not
used, and I receive an error message saying that NULLs are not allowed for
that column.
How can I get DTS to insert these rows using the default column values,
rather than trying to insert the NULLs from the text file?
(Incidentally, I have also tried unchecking the "Check constraints" option
in the Transform Data Task Properties, and I still get the same error about
inserting a NULL into a column that doesn't allow it.) |