dbTalk Databases Forums  

SSIS Data Flow - Have Null values take table default

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


Discuss SSIS Data Flow - Have Null values take table default in the microsoft.public.sqlserver.dts forum.



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

Default SSIS Data Flow - Have Null values take table default - 06-06-2006 , 10:54 AM






Hi,

I have a data transform from a flat-file to a SQL server database.
Some of the flat-file fields have NULL values. The SQL table I'm
importing into does not allow NULL values in any field, but each field
has a Default value specified.

I need to have it so that if a null value comes across in a field using
the data transform, it takes the table default on import. I could of
sworn I had this working a few days ago, but I get errors now that
state I'm violating table constraints. Has anyone done this before?

Thanks
Jeff


Reply With Quote
  #2  
Old   
Jeff
 
Posts: n/a

Default Re: SSIS Data Flow - Have Null values take table default - 06-07-2006 , 12:42 PM






Ok so I've done some more poking, and this is what I've been able to
come up with:

1) If a sql table column has a default value, but allows Nulls, I have
gotten SSIS to successfully use the table's default value when it sends
a Null field over to the SQL table. This works when FastLoadKeepNulls
= False in the OLE DB Destination properties.

2) HOWEVER, even if a column has a default value, if Nulls are not
allowed in the SQL table, SSIS bombs when it tries to send a null (or
what should be the default) value over to the table. I've tried every
combination of properties in the OLE DB Destination properties and
can't get it to work when Nulls are disallowed in the SQL table.

Being able to at least do #1 will likely let me squeeze by, but I still
think there's gotta be a way to get the default value input when nulls
aren't allowed.


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.