Member of the LearnItFirst.com Video Training Network | LearnSqlServer.com | SQL SSIS Training | SQL Programming Tutorials |
LearnSqlServer.com Forums LearnSqlServer.com
Welcome Guest Search | New Posts | Members | Log In | Register

Pasing null value to a datetime field Options
xtreemnet
Posted: Tuesday, July 17, 2007 10:08:26 PM

Rank: Fledgling

Joined: 6/26/2007
Posts: 10
Points: -170
Location: New Zealand
Hi,

I am trying to import a csv file to a SQL table. The csv file sometimes has blank value which needs to map to a datetime destination field. The package fails in this case.

Can someone guide me on how to handle this in SSIS package?

Thanks
Scott Whigham
Posted: Thursday, July 19, 2007 11:56:23 AM


Rank: Super Mod

Joined: 3/20/2006
Posts: 345
Points: 748
Location: Dallas, TX
You don't really tell us why SSIS fails though - is the destination column NOT NULL? I'm unclear as to why it fails. Do you want the blank value to be NULL in the destination?
xtreemnet
Posted: Thursday, August 02, 2007 5:12:02 PM

Rank: Fledgling

Joined: 6/26/2007
Posts: 10
Points: -170
Location: New Zealand
Sorry. The destination column is null. But since its datetime fiedl it was accepting the blank value coming from the file.

I got it going now. I used derived Column to convert the date as below:

WhenTransferred == "" ? NULL(DT_WSTR,50) : WhenTransferred
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
     
Don't Forget!
LearnItFirst.com
Don't Forget!
LearnWindows2003.com
 
Home | About Us | Support | Contact Us | Privacy | Site Map | Blogs Blogs Refer a Friend and Get a Free Subscription!
© Copyright 2004-2007 LearnItFirst.com LLC. All rights reserved. All trademarks remain the property of their respective owners.
This site is not affiliated in any way with the Microsoft Corporation.