janwrage
asked on
Detect duplicate entries in datatable rows
Hi!
I have a datatable with the following columns:
givenname, surname, title, dept, identifier
Now I have thousands of rows like this for each user in the company:
Bill,Gates,,IT,1000
As some of the users have the same name, I have something like this:
Bill,Gates,,HR,2678
Now I want to detect these users and write the identifier (as this is unique) of these users to a list(of string).
How can I do that?
Thanks, Jan
I have a datatable with the following columns:
givenname, surname, title, dept, identifier
Now I have thousands of rows like this for each user in the company:
Bill,Gates,,IT,1000
As some of the users have the same name, I have something like this:
Bill,Gates,,HR,2678
Now I want to detect these users and write the identifier (as this is unique) of these users to a list(of string).
How can I do that?
Thanks, Jan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then you need to loop through the table i think. Or if you are using VB.NET 2008, try using LINQ. Check out these links
http://geekswithblogs.net/azamsharp/archive/2006/04/21/76054.aspx
http://www.codeproject.com/KB/vb/Merging_two_DataSets.aspx
http://geekswithblogs.net/azamsharp/archive/2006/04/21/76054.aspx
http://www.codeproject.com/KB/vb/Merging_two_DataSets.aspx
ASKER
Thx, I'll check it out.
did provide a solution which the asker choose not to implement
ASKER
The table is filled by some CSV-Parser, so no SQL...