Make sure the null value is replaced with 0

How to determine if the value is null, and replace it with 0?

U can use if condition with condition as row(ColumnName).ToString.Equals(" ")

If the condition is true then assign that row with 0 value


1 Like

I want to convert con2 and con4 to double comparison, But the CON4 column has empty values.
Unable to convert error!

U can use the if condition before converting to double for comaparison so as to handle the error


row(ColumnName).ToString.Equals(" ")

Can we do it in the if condition?I have multiple columns, it’s going to be slow before if.

Hi @491114473 did u mean u need to use it without if condition?

The if expression replaces the null value with 0.

Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.