Stuart McLachlan
stuart at lexacorp.com.pg
Fri Jan 14 17:42:23 CST 2011
Yep that's neater. Very elegant. -- Stuart On 15 Jan 2011 at 0:03, Asger Blond wrote: > Excellent solution Stuart! Using an aliased subquery it might be > compressed to a single query like this: > > SELECT AllSiteCodes.Site, AllSiteCodes.LCode > FROM (SELECT DISTINCT tblSites.Site, tblLookup.LCode > FROM tblSites, tblLookup) AS AllSiteCodes LEFT JOIN tblSites ON > AllSiteCodes.Site=tblSites.Site AND AllSiteCodes.LCode=tblSites.LCode > WHERE tblSites.Site Is Null > > Asger >