Page 1 of 1

Conditional update of a field

Posted: Wed Jun 20, 2007 3:43 am
by fanfanlat
Hi everybody !

I wanted to know if there is a way to make an update of a field only if a certain condition is OK.

I have a lot of fields and I want to update all of them in all cases but one only if a condition is satisfied for a piece of data.

In the transform, I would like to make this test : If link1.myDate > '01/01/2007' Then Update Else (Not update).

I'm afraid I have to make another link to the table in order to manage this case (update of all fields in one row and update of the specific field only if the constraint is satsified...). Am I right ?

Thanks in advance,

Regards,

Fanfan

Re: Conditional update of a field

Posted: Wed Jun 20, 2007 4:58 am
by srinath
Yes, You can do this with 2 links one link with the constraint "link1.myDate <= '01/01/2007' " and updating all the columns and the other link with constraint "link1.myDate > '01/01/2007' " and updating the column that you want to update.