We help IT Professionals succeed at work.

Insert Null inside "Derived Task"

yechan
yechan asked
on
Medium Priority
510 Views
Last Modified: 2013-11-10
Hi,

I am doing a null check on a column inside a "Derived Column" task.  My Expression looks somethig like the following:

isnull( [ExpectedDelDate]) == True ? null : "someValue"

Essentially I would like to insert a null if ExpectedDelDate is a null value, otherwise insert "someValue".

thanks
Comment
Watch Question

Sr. BI  Developer
Commented:
Hello,

1-ISNULL itself is a Boolean, you don't' need to use TRUE OR FALSE

2-is that's a date column??  
 
ISNULL( @[User::ExpectedDelDate])  ? NULL(DT_DATE) : (DT_DATE) "11/2/2011"

Open in new window


but you're trying to insert a STRING...
 
ISNULL( [ExpectedDelDate])  ? NULL(DT_WSTR, 4 ) : "someValue"

Open in new window




Author

Commented:
Thanks.  I think that seemed to do the trick.  The Null(DT_WSTR, 4) syntax means to cast somethiing to null?
Jason YousefSr. BI  Developer

Commented:
Yep.. check attached :) cast cast

Explore More ContentExplore courses, solutions, and other research materials related to this topic.