I am loading a CSV file into DataSet object. Then putting the data into a DataView so I can easily sort it.
That's sweet and easy. But my ultimate goal is to remove any rows where the GUID only occurs in the data set one time. I tried a filter like this:
sortedData.RowFilter = "COUNT(GUID) > 2 group by GUID";
But of course that does not work. I think the COUNT thing is okay, but what I want is like on a SQL query for it to group by GUID. This would naturally remove any records which have a GUID that does not appear more than twice in the data.
Is there a good way to do this? Or am I going to be forced to loop through the data set after it's sorted, manually deleting the rows I don't want?
// Sort it by GUID then Source
DataView sortedData = this.csvDATA.Tables.DefaultView;
sortedData.Sort = "GUID,SOURCE ASC";