Filtering data table and making condition in it

hi i want to filter a data table and if the condition of filtering not met. it will proceed to the next sequence. how can i do it. ty in advance

O_Filtered_BSP094 = (From r In BSP094_ADJUSTED_DT.Select() Where r(46).Equals(“O”) Select r).CopyToDataTable

@ldiaz

Please try like this

BSP094_ADJUSTED_DT.AsEnumerable.Where(function(x) x(46).ToString.Trim.Equals("O")).CopyToDataTable

Hope you are trying to filter 47th column with O

cheers

Hello @ldiaz

You can check the below thread to do the filtering. Then use an if condition to check whether the datatable filtered is having some rows “filteredDatatable.Rows.Count>0”

Thanks

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