In Access, I'm identifying duplicate records based on 28 columns. I want to also select a non-duplicate column but can't figure it out.
tbl_1: bud_line | fund | name | amt 123 | ABC | BOB | $8 123 | ABC | BOB ROSS | $8 321 | ABC | BOB | $8 321 | AAA | BOB | $8 321 | AAA | BOB | $20 321 | XXX | JOHN | $10 321 | XXX | JOHN | $10
The only lines I want on the output would be:
123 | ABC | BOB | $8 123 | ABC | BOB ROSS | $8 321 | XXX | JOHN | $10
I was using a query like:
select bud_line, fund, amt
from tbl_1
group by bud_line, fund, amt
having count(*) > 1
I get my dups, but I don't get the names BOB & BOB ROSS to identify them.
I tried adding name to the select, but it errors because it's not part of the aggregate function.