RE: Selecting data from three tables

2006-12-01 Thread Jerry Schwartz
I'm not sure I followed everything you said, but if products.productid is NULL then I think you will only find those categories that have no matching products in the products_categories table. Is that what you want? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmi

Re: Selecting data from three tables

2006-12-01 Thread Rolando Edwards
The query you suggested with two tables is a great start. If you make your query into an inline-view (which treats a query like a table) you could now connect the categories table to your suggested query: SELECT AA.categoryid, AA.productid FROM ( SELECT A.categoryid, A.productid