Re: Null in subquery returns no records

From: Database Guy <dbguy101_at_hotmail.com>
Date: 6 Feb 2004 15:13:13 -0800
Message-ID: <7fdee71c.0402061513.706ec3a_at_posting.google.com>


"Mike MacSween" <mike.macsween.nospam_at_btinternet.com> wrote in message news:<4023985a$0$4096$5a6aecb4_at_news.aaisp.net.uk>...
> This as the row source for a combo:
>
> SELECT qryRole.RoleID, qryRole.Role
> FROM qryRole
> WHERE (((qryRole.RoleID) Not In (SELECT RoleID FROM qryRoleEvent INNER JOIN
> qryEvent ON qryRoleEvent.EventID = qryEvent.EventID WHERE ProdID =
> Forms!frmProductions!ProdID)))
> ORDER BY qryRole.Role;
>
> If there is just one RoleID with a null value in the subquery then the main
> query returns no records atall.

That is the SQL standard, oddly IMHO.

DG Received on Sat Feb 07 2004 - 00:13:13 CET

Original text of this message