We help IT Professionals succeed at work.

VB.Net - Comparing Two DataTables

63 Views
Last Modified: 2015-08-17
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
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.