Avatar of Jimbo99999
Jimbo99999
Flag 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
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
Jimbo99999

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Wayne88

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Fernando Soto

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23