Update empty datatable value without foreach

I have to replace the empty values in Column1 with the corresponding values from Column2 in the datatable. Considering the number of records, i dont want to use foeach loop. How we can achieve that without using foreach loop?

Column1 Column2 Column3
AA AB AC
BB BC
CA CB CC
DB DC

Regardless of whether you use a For Each or if you use a Linq query, this will take a similar amount of time.

Here is a solution using Select to iterate over only the rows where Column1 is blank:
Processusvierge.zip (2,3 Ko)

2 Likes

Thanks Anthony… Will try

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