Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Because of the join I now have multiple rows of Chai and Chang.
These filters are users who makes selection in dropdown lists, so even if shippostalcode is chosen, I still need one hit.

distinct productName

will give me one row per product, but that's not the way to solve it, is it?

EDIT:
Thank you guys,
Yes, supplier is an int.

So If there be would another many to many relation from the Products table I can just add another AND, I guess.

Sorry, this is a very sad example, but if I add OrderDetails2 and Orders2 where OrdersDetails2 will be a junction table between Products and Orders2, I can just add add another AND (and keep on filtering), like this:

IN or EXISTS subquery is what would solve this, if you want results only from the products table. Irrelevant: Why are you using WHERE @supplier = '' when @supplier is an integer?
–
ypercubeSep 22 '13 at 10:52