I need aquery to get all products suplied by both s1 and s2 supliers

J

June7 via AccessMonster.com

Not advisable to post your emails in forums. In some forums the moderators
will remove emails.
Should have posted your code attempt. The link you gave didn't work for me.
Do you want SQL statement?
"SELECT p3, p4 FROM tablename WHERE supplier=s1 OR supplier=s2"
 
A

a.first.r

Not advisable to post your emails in forums. In some forums the moderators
will remove emails.
Should have posted your code attempt. The link you gave didn't work for me.
Do you want SQL statement?
"SELECT p3, p4 FROM tablename WHERE supplier=s1 OR supplier=s2"

Thanks for your post.

I tried the link it was wrkn fin.

Yes i want aSQL statment but yours will not get the required info.

agin what i want is a select command to show all products suplied by
bouth s1 and s2.

products p1 : p5 is just an example to make the problem clear.

thanks for all.
 
J

John W. Vinson

In the attached database i need aquery to list products suplied by
suplier s1 and suplier s2 .

The list should contain p3 , p4 only.

I tried but get p1 , p3 , p4 , p5 which not right.

thanks for all.

http://www.4shared.com/file/107324011/1b133d93/Database11.html

Very few folks will download a database. We're all unpaid volunteers here;
it's much better to post a text *DESCRIPTION* of your table structure.

What are the structures of your Products and Suppliers tables? Do you have a
third table resolving the many to many relationship? If so, a couple of
subqueries

SELECT * FROM
(Products INNER JOIN ProductSupplier A ON Products.ProductID = A.ProductID)
INNER JOIN ProductSupplierB ON Products.ProductID = B.ProductID
WHERE A.SupplierID = "S1"
AND B.SupplierID = "S2";
 

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

Top