Link to home
Create AccountLog in
Avatar of Jimbo99999
Jimbo99999Flag for United States of America

asked on

VB.Net - Comparing Two DataTables

Good Day Experts!

I have 2 lists of AccountNumbers.  I am looking for duplicate product numbers across all the accounts.  Here are my 2 lists and a little summary of what I am doing:

1     1
2     2
4     4    
5     5
6     6

I loop through first list comparing to all in the second list.  Problem I have is...say I find a duplicate in Account 1 and 2...then I also get the same record when on Account 2 and comparing to Account 1.  

Do you have any ideas on hos I can better do this compare to eliminate the extra records?

Thansk,
jimbo99999
ASKER CERTIFIED SOLUTION
Avatar of Wayne88
Wayne88
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Jimbo99999

ASKER

Thank you all for the replies.  I will go the route Wayne88 alluded to.  Fernando Soto, I have never used your idea but I appreciate your contribution and will put it in my toolbox for future use.

Thanks,
jimbo99999