Page 1 of 1

Assign null value to a date

Posted: Thu Jul 01, 2010 5:28 pm
by jagadam
Hi

I am trying to assign a null value to a date based on a certain condition in the transformer.

If the score is 1 then the data shld be assigned else the date shld be null in DB.

I am using something like
If score=1 then DSJOB start date else ' '

But its failing. How to handle this scenarios?

thanks

Re: Assign null value to a date

Posted: Thu Jul 01, 2010 5:33 pm
by pradeep9081
Use the SetNull() function. and make sure the target column is nullable

Posted: Thu Jul 01, 2010 7:22 pm
by chulett
If you still need help with this, please don't post "something like" what you are doing - post exactly what you are doing so people can provide the proper help. Also note that saying something "is failing" really doesn't give us anything to work with, always a good idea to post (unedited) any error messages you get from a failure.

Also as noted: two quotes is an empty string which is not the same as null so use the SetNull() function instead.

Posted: Thu Jul 01, 2010 10:46 pm
by Sreenivasulu
If you try to compare a null value OR using it against a lookup then the record may get dropped.
Regards
Sreeni