Ah, I like that one. Long time ago (not so long, in fact), Jet was not
behaving in the same way than MS SQL Server, but it seems Microsoft did
manage to change Jet, after all, ... well, almost. In Northwind, try:
SELECT Employees.LastName
FROM Customers LEFT JOIN Employees
ON (Customers.CompanyName = Employees.LastName AND Employees.LastName =
"Tweety Bird")
Take a look at the result, many records are returned., all empty.
Clearly no one has his/her last name = "Tweety Bird", so the condition is
always false.
So, change the ON clause with something that will be always .... false...
SELECT Employees.LastName
FROM Customers LEFT JOIN Employees ON (Customers.CompanyName =
Employees.LastName AND false)
and this time, no record are returned.
And, if you ever run the first query on an unpatched Jet, you will also get
no record at all, with the first query.
So, be very careful using this syntax, with Jet. Microsoft seems to like to
change its behavior.
Vanderghast, Access MVP