dbTalk Databases Forums  

Error inserting NULLs from a CSV file.

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Error inserting NULLs from a CSV file. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DoubleBlackDiamond
 
Posts: n/a

Default 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.)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.