Thursday, 15 March 2012

sql - show duplicate rows in access -



sql - show duplicate rows in access -

i have table

men

id | qty | place ======================== 111 | 10 | 55 111 | 20 | 66 111 | 10 | 77 222 | 40 | 11 333 | 50 | 11 111 | 10 | 22 222 | 44 | 33 222 | 40 | 44 333 | 15 | 55

i need show records id=id , qty=qty this:

id | qty | place ===================== 111 | 10 | 55 111 | 10 | 77 111 | 10 | 22 222 | 40 | 11 222 | 40 | 44

you can this:

select men.id, men.qty, men.place men inner bring together (select men.id, men.qty men grouping men.id, men.qty having (((count(*))>1))) on (men.qty = a.qty) , (men.id = a.id) order men.id, men.qty;

create inner query find there more 1 instances of id bring together original table place values.

sql ms-access

No comments:

Post a Comment