"Ponder co.uk>" <ponder_public@yahoo.<NOSPAM> wrote in message
news:3f***********************@news.ukonline.co.uk ...
Okay here's the scenario:
I have two big lists of numbers. One number on each line (they're
telephone numbers if that helps.) What I want to do, is have VB search through
list2.txt for numbers that are also in list1.txt and delete them. I
would usually sit and figure this out myself but I have the flu and I know
how helpfull you guys are :P~
Thanks in advance to anyone that can help.
-Ben-
Another option would be to import both lists into an Access database.
One simple left join query between the two would give you all the
numbers in List2 that are not in List1, which you could use to create a
third table called List2Cleaned. The SQL might look like this:
SELECT List2.PhoneNumber INTO List2Cleaned
FROM List2 LEFT JOIN List1 ON List2.PhoneNumber = List1.PhoneNumber
WHERE (((List1.PhoneNumber) Is Null));
Then export List2Cleaned as text again if you need it as a text file.
Putting indexes on both PhoneNumber fields will speed up the process for
long lists. That takes one click in Access, versus coding your own in
VB.
This is one area where Access is actually a pretty useful tool. It took
me maybe two minutes to dummy up a sample so I could build the query
shown above.