Update null records
Im trying to update nulls - first I convert them to empty strings - I know this but it is not working.
isnull(lkpAccountExpires)? " " : [lkpAccountExpires] - this syntax is supposed to be correct - I've used it in the past and it worked I'm not sure why it's failing now but basically it's supposed to evaluate the return of my lookup - check to see if it's
null - then change it to an empty strinf if it is so I can use an ole db command to update it.
KDW
November 30th, 2010 2:55pm
what error do you receive with that expression?http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 3:03pm
Why not to use this expression like this (modify to suite your needs):
((ISNULL(lkpAccountExpires) ? 0 : lkpAccountExpires) != (ISNULL(dest_lkpAccountExpires) ? 0 : dest_lkpAccountExpires))Arthur My Blog
November 30th, 2010 3:10pm
so just use that in my conditional split? Will that work?KDW
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 3:19pm
Sorry, forgot to mention that the intended purpose yes, is to use it in the Conditional SplitArthur My Blog
November 30th, 2010 3:22pm
I think I know what it is -
I need to cast the date as a string beofre i can check for nulls and then use an empty string...can you assist with casting to string?KDW
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 3:29pm
the value is either null or a date, not sure why you need this.Arthur My Blog
November 30th, 2010 3:36pm
This won't work either - it's looking for date format where the 0 isKDW
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 4:06pm
Hi KDW,
Does Arthur's expression work? If so, we can use another Derived Column transfomation task to change the value 0 to empty string again.
Thanks,
Jin ChenJin Chen - MSFT
November 30th, 2010 10:30pm
Jin - no it did not - I would rather do everything in an ssis package instead of using a stored procedure being called in ssis.
The derived column is expecting a date format to be replaced - so if I replace it with getdate() - I think it will work - when it evaluates the expression it does not turn red. I do not want to use a value - nulls converted to empty strinngs
would be preferred.
or how about if MS allowed nulls to be updated - hey - that would be a neat idea huh!!!
Anyway - if you can provide an alternative suggestion - please do so.KDW
Free Windows Admin Tool Kit Click here and download it now
December 1st, 2010 2:13pm
I do not understand why a stored procedure mentioned here. When you say it does not work, do you get an error?
Empty string is "" not " ", did you try this?Arthur My Blog
December 1st, 2010 3:02pm
Could you elaborate on what is the current situation please?Arthur My Blog
December 1st, 2010 3:39pm