Make sure the null value is replaced with 0

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

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

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

row(ColumnName)=0

1 Like

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

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

Like

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

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

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.