Matched Query

TimTDP

Registered User.
Local time
Today, 16:41
Joined
Oct 24, 2008
Messages
213
I am looking for a query that will return records from a table that have related records in another table. Opposite to the Unmatched Query Wizard

I have two tables: tblSupplier and tblSupplierProducts
The two tables are related by the field "SupplierId"

I need the query to only return Suppliers that have Products.

Can someone please assist

Thanks in advance
 
No offense, but your request doesn't make sense in the context of your time here. You've been registered here for over 7 years with near 200 posts and this is a remedial query (at least the one you have described). I really think I am missing something. Here's a great site for learning about simple queries:

http://www.w3schools.com/sql/

Surely you have done a simple join on tables. What have you tried so far and how hasn't it worked?
 
just use an inner join on supplierid between the two tables

Code:
 SELECT DISTINCT tblsupplier.* 
 FROM tblSupplier INNER JOIN tblSupplierProducts 
     ON tblSupplier.supplierid = tblSupplierProducts.supplierid
 
Last edited:
Thanks CJ_London

plog, you are 100% correct.
Just wasn't thinking straight. Think it is time to quit for the day and have a glass off....
 

Users who are viewing this thread

Back
Top Bottom