Quote:
>Ok, I understand, but I still whit my problem. I have ask on newgroup how to
>do a left join sql request with an union. Someone answer me and in the
>answer the people say that I must use JET 4.0 to be able to run this
>request.
>My DbEngine.version is 3.6 and give me an error in the from clause in the
>sql request when I'am trying to execute the request. Access 2002 give me the
>same error. Here is the request :
>SELECT card.*
>FROM card LEFT JOIN (SELECT NomAbbr FROM zone UNION ALL SELECT NomAbbr FROM
>group ). AS toto ON card.zone = toto.name
>WHERE toto.name IS NULL;
>Is there an error in this request ? Or I need to do something else for this
>request to works ?
If that's an exact copy of the query you're trying to run,
then, yes, there are a couple of errors.
1) The . after the ) should be removed. Maybe this was
mistakenly left in from an A97 query where it was
needed?
2) The field in the ON expression is different from the
field selected in the union query.
I can't tell what you really want, but maybe this will be
close(?)
SELECT card.*
FROM card
LEFT JOIN
(SELECT NomAbbr
FROM zone
UNION ALL
SELECT NomAbbr
FROM group
) AS toto
ON card.zone = toto.NomAbbr
WHERE toto.NomAbbr IS NULL;
--
Marsh
MVP [MS Access]