Compare two text files

  • Thread starter Thread starter dontread
  • Start date Start date
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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top