RE: EXISTS/NOT EXISTS

2004-06-18 Thread Anton Ivanov
] Sent: Friday, June 18, 2004 2:38 PM To: Anton Ivanov Cc: [EMAIL PROTECTED] Subject: Re: EXISTS/NOT EXISTS Subqeries require mysql 4.1. The manual offers some suggestions on rewriting subqueries as JOINs <http://dev.mysql.com/doc/mysql/en/Rewriting_subqueries.html>. In your case, yo

Re: EXISTS/NOT EXISTS

2004-06-18 Thread Michael Stassen
Subqeries require mysql 4.1. The manual offers some suggestions on rewriting subqueries as JOINs . In your case, you want something like: SELECT product FROM products p LEFT JOIN products_by_product_areas a ON p.product = a.product

Re: EXISTS/NOT EXISTS

2004-06-18 Thread Andrew Pattison
PROTECTED]> Sent: Friday, June 18, 2004 10:16 PM Subject: EXISTS/NOT EXISTS Hi, I'm trying to figure out how to apply these from the manual, but to no avail. Is it possible that my version (4.0.18) does not implement these? I have two tables: products and products_by_product_area. Bot

EXISTS/NOT EXISTS

2004-06-18 Thread Anton Ivanov
Hi, I'm trying to figure out how to apply these from the manual, but to no avail. Is it possible that my version (4.0.18) does not implement these? I have two tables: products and products_by_product_area. Both have a field "product". I try SELECT product from products WHERE NOT EXISTS (SELECT