Pulling Back Duplicate Data

N

Novice2000

Hi,

I want to design a report to pull back data where there may be more than one
record for a client like so:

Client# Product#
123456 8888
123456 1199
111111 9988
111111 1199

How can I use the Client # to pull back all instances of product #s??

Thanks
 
J

jahoobob via AccessMonster.com

Use a Find duplicates query for your report:
SELECT yourtable.[client#], yourtable.[product#]
FROM yourtable
WHERE (((yourtable.[client#]) In (SELECT [client#] FROM [yourtable] As Tmp
GROUP BY [client#] HAVING Count(*)>1 )))
ORDER BY yourtable.[client#];
 
N

Novice2000

Thank you. I can't wait to try it.

jahoobob via AccessMonster.com said:
Use a Find duplicates query for your report:
SELECT yourtable.[client#], yourtable.[product#]
FROM yourtable
WHERE (((yourtable.[client#]) In (SELECT [client#] FROM [yourtable] As Tmp
GROUP BY [client#] HAVING Count(*)>1 )))
ORDER BY yourtable.[client#];
Hi,

I want to design a report to pull back data where there may be more than one
record for a client like so:

Client# Product#
123456 8888
123456 1199
111111 9988
111111 1199

How can I use the Client # to pull back all instances of product #s??

Thanks
 
Top