Finding duplicates accross two fields

A

aine_canby

Hi,

I have the following table fields: f1, f2, f3, f4, f5

I want a Unique index accross f2 and f3.

Therefore the following rows would not be allowed:

1, 2, 3, 4, 5
a, 2, 3, d, e

since 2, 3 appears twice.

But how can I display all rows using a query that are duplicated in
this way?

Thanks,

Aine.
 
S

scubadiver

Create a new field

Dup: IIF([Field1]=[Field2],1,0)

In the criteria line put a zero

untick the checkbox as well (if you want)
 
M

Michel Walsh

SELECT f2, f3
FROM myTable
GROUP BY f2, f3
HAVING COUNT(*) >1


will give you the {f2, f3} couples that are present in more than one
record.



Hoping it may help,
Vanderghast, Access MVP
 

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

Similar Threads


Top