SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 how to replace null values
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqllearner05
Starting Member

India
9 Posts

Posted - 07/19/2012 :  01:42:37  Show Profile  Reply with Quote
i have a value of column as null from txt file, if null i want to replace it with 0 if not same value, but the problem is value coming from txt is null and i want to put 0 in table having data type int, please suggest me what expression should i give in derived column transformation.

thanks in advance

sqllearner

jleitao
Yak Posting Veteran

Portugal
52 Posts

Posted - 07/19/2012 :  05:50:41  Show Profile  Reply with Quote
ISNULL ([column]) ? 0 :[column]
Go to Top of Page

jleitao
Yak Posting Veteran

Portugal
52 Posts

Posted - 07/19/2012 :  05:52:50  Show Profile  Reply with Quote
Or if you recive "Null" as text:

[column] == "NULL" ? 0 : [column]
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000