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: SQL_CALC_FOUND_ROWS using ODBC driver

2007-02-19 Thread Bonnett, John
Why not just SELECT COUNT(*) FROM MyTableName; and the result will be in rs.Fields(0).Value? John Bonnett -Original Message- From: Nuno Oliveira [mailto:[EMAIL PROTECTED] Sent: Thursday, 15 February 2007 11:34 AM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: SQL_CALC_FOUND_RO