Compare two text files

D

dontread

I have two text files with computer names in a single column. I need to
compare the two
files to find out which computers are in one text file that are not in
the other. The field name is 'Name' and this is the primary key of
course.
 
T

Travis

Put them in two different tables. Run an SQL query

SELECT tblFirstTable.Fieldname
FROM tblFirstTable
WHERE ((tblFirstTable.Fieldname) NOT IN (SELECT Otherfieldname from
tblSecondTable))

Hope this helps.

Travis
 
R

Roger Carlson

One table needs to be the basis for comparison. In effect, you say "which
records in table2 are not in table1". So you have to create another query
that asks "which records in table1 are not in table2". If you want, you can
UNION those queries to find a complete list of records, but it doesn't tell
which table they're missing from. I guess it depends on how you're planning
on using the information.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Top