Page 1 of 1

If value is negative need to make it default 0(zero)

Posted: Fri Nov 11, 2011 3:46 pm
by synsog
Hi All,

Can we find whether the field is having Negative(-) value then I need to write default value zero(0).

Please advise any easy way for this.

Thanks in Advance

Posted: Fri Nov 11, 2011 4:18 pm
by jwiles
Given the documented if-then-else construct in a transformer, how would you test for a negative value (that is, what would be the condition that determines whether or not the value is negative)?

Regards,

Posted: Mon Nov 14, 2011 11:40 pm
by peddakkagari
IF Column_Value < 0 THEN 0 ELSE Column_Value

Posted: Tue Nov 15, 2011 6:50 am
by selina_king
both of peddakkagari and jwiles are right. but I have another idea to resolve the problem.

you can user transformer stage and use "null handing" function, you can set any value when is null

Posted: Tue Nov 15, 2011 8:33 am
by chulett
selina_king wrote:both of peddakkagari and jwiles are right. but I have another idea to resolve the problem.

you can user transformer stage and use "null handing" function, you can set any value when is null
Note, however, that nowhere in their problem statement is the word "null" mentioned.