RE: comparing two lists

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 12/29/04


Date: Wed, 29 Dec 2004 09:11:01 -0800

The basic process is:

1. Pull both sets of information
2. Sort both sets of information in the same order
3. Run through both sets with one set of info as master and the other as
slave. Always advance until slave is equal to or greater than master.

If one is in a file, consider dumping the database info to a file (using
BCP, or your own code) and then use StreamReaders to rip through each file.
The BCPed file will already be sorted by employee ID, so you will just have
to make sure the non-database file is sorted in the same order.

---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"rik butcher" wrote:
> hey guys, i need some help on an approach.
> i need to compare, two different lists.
> one will be pulled from a dataset and could have as much as 2500 varchar employee numbers in it.
> the other will have the same data, but might be missing some of those same numbers.
> what's the best way to compare the two lists, or group or array and find who's missing from the second list?
> thanks
> rik
> 
> **********************************************************************
> Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
> 


Relevant Pages

  • comparing two lists
    ... hey guys, i need some help on an approach. ... i need to compare, two different lists. ... the other will have the same data, but might be missing some of those same numbers. ...
    (microsoft.public.dotnet.framework.adonet)
  • Check value and add to list
    ... I am having problems figuring out how to take two text lists, compare ... the new list to the master, and update the master if it is missing and ...
    (microsoft.public.excel.programming)
  • Re: fastest sorted list type?
    ... I'm not aware of any scenario you've mentioned in which what you're sorting is "just an int". ... Yes, you have a scenario in which you are sorting a list of ints, but when you actually compare two entries in that list you aren't comparing the integers themselves, but rather the data in an object to which the int refers. ... I did have a look on google and wiki lists al the sort algorothms nicely, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Member server not in network nhood.
    ... the shares on the server? ... > System Missing from its Local Subnet Master Browser's List ... > also be missing from all other browse lists. ...
    (microsoft.public.windows.server.networking)
  • Fuzzy comparison
    ... I'm trying to come up with a simple function that will allow me to compare ... long as they are within some tolerance but I also want the function to "act" ... total(but a weighted sum). ... compare two lists to see which one is "better". ...
    (sci.math)