I have a data table with 23 columns and I need to find duplicate rows. For each duplicate row I need to add a flag on both identical rows on a 24th column. Whats the best approach? I have been searching the forum but I only find examples comparing one or two columns. I need to check all 23 columns. Is it possible to treat the 23 columns as one string like “Column1,Column2,…” and compare this string to other rows?
What I’ve done so far is to sort the data table on an ID and added the 24th column. Now I would like create the big string and loop through the data table. No idea how to do this though or if there are better ways to do this,…
(From p in dt.Select() where( From q in dt.Select() where string.Join(“,”,q.ItemArray).Equals(string.Join(“,”,p.ItemArray)) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable()
This returns a data table with all the duplicate rows. Any ideas how to just add a flag on a new extra column to show that the row is a duplicate? I would like to do a left join to my initial data table and just add a “D”.
I have html table attached below, in that i need to click on first "Confirmation statement " , and " Annual return " row . I have tried to it ,But i got stucked with the logic pls help me outtest2.xaml (24.5 KB)