Show only once

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

I have a query consisting of the fields productid and customerid.It shows the
products bought by the customers.These products are bought with different
orders.Therefore they are repeated many times for one and the same
customerid. I want to show however only the clients that have bought this
product.Therefore is it possible to restrict the query and show the
customerid for a given productid only once.
For example

Productid customerid

1409 3000
1409 3000
1409 3000
1409 3000

Is it possible for the query to show only:
1409 3000
 
M

Marshall Barton

samotek said:
I have a query consisting of the fields productid and customerid.It shows the
products bought by the customers.These products are bought with different
orders.Therefore they are repeated many times for one and the same
customerid. I want to show however only the clients that have bought this
product.Therefore is it possible to restrict the query and show the
customerid for a given productid only once.
For example

Productid customerid

1409 3000
1409 3000
1409 3000
1409 3000

Is it possible for the query to show only:
1409 3000


SELECT DISTINCT Productid, customerid
FROM thetable

Or, in the query designer, set Unique Records to Yes
 

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

query data from a parent-child table 1
Unmatched Records 7
Group by query 7
Query Problems 3
Top N Records on multiple fields 14
Do I need a subquery? 2
union query 0
SQL Help - Criteria Based On 2 Fields 1 Table 1

Top