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

  • Thread starter Thread starter a.first.r
  • Start date Start date
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.
 
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";
 
Back
Top