Re: Negated SELECT query

2009-03-17 Thread BobSharp
categories c ON a.assetcategoryID = c.assetcategoryID WHERE m.assetID IS NULL ORDER BY a.assetID Cheers - Original Message - From: "Bonnett, John" To: ; Cc: ; Sent: Tuesday, March 17, 2009 10:59 PM Subject: RE: Negated SELECT query SELECT Employees.* FROM Employees

RE: Negated SELECT query

2009-03-17 Thread Bonnett, John
SELECT Employees.* FROM Employees LEFT JOIN Assets ON Employess.EmployeeID = Assets.EmployeeID WHERE Assets.EmployeeID IS NULL The one for assets with no maintenance is similar. The point is the left join above produces in its output all rows from the Employees table regardless of whether anythi

Re: Negated SELECT query

2009-03-17 Thread Perrin Harkins
On Tue, Mar 17, 2009 at 12:42 PM, BobSharp wrote: > These have been written successfully with Sub-Queries, > I would like to know how they can be done with only JOINs  ? http://dev.mysql.com/doc/refman/5.0/en/rewriting-subqueries.html - Perrin -- MySQL General Mailing List For list archives: ht