is it possible

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

i have a table with the following data loan# in first
column and name in second and in this table most of the
time you will see 2 records with the same info. im trying
to find those records that have the same loan# but
different name. Can i do this? for example i only want
to see the henry and naylor entries.

loan# name
1122 Jones
1122 Jones
1139 Smith
1139 Smith
1140 Henry
1140 Naylor
 
Dan,
Try the following:

Create a new query. Select loan #, name, and name again.
Change this to a totals query. Leave group by for loan #
and the first occurrence of name. Change the group by to
count for the second occurrence of name. THen, in
criteria for second occurrence, put 1.

This should give you what you want.
 
Try something like the following, substituting your field and table names.

SELECT [Loan#], [Name]
FROM Table
WHERE [Loan#] In
(SELECT T1.[Loan#]
FROM Table as T1 Inner Join Table as T2
 
Back
Top