[AccessD] NOT Query.

Mark A Matte markamatte at hotmail.com
Tue Mar 31 10:43:47 CDT 2009


I think there are a number of approaches...many already mentioned.
 
I saw the EXISTS...the Not In...the 3rd query to join Query A and Query B and look for nulls...
 
Just thought of a different view...did you need to know who was only in 1...A or B but not both....you could use a UNION ALL for A and B...then query the union to count Less than 2.
 
SELECT zz1.test,"A" as Q_Name,count(zz1.test) as tt
FROM zz1
group by test
union all SELECT zz2.test,"b" as Q_Name,count(zz2.test) as tt
FROM zz2
group by test;

Just a thought...
 
Mark A. Matte

>
> Hi There,
>
> Having a complete brain fade. (heh, must be suffering from 'Ribbon fatigue'
> or trying to imagine NULL).
>
> I have two queries. Query A and Query B both contain a field called Clients
> (Based on the same underlying data). A and B correctly return a different
> number of records in the client field. I want to be able to list which
> clients are in query B that are missing in Query A. Basically I want the
> opposite of joining the two queries based on the clientfield.
>
> This should be easy, but I am stuck! :-(
>
> any pointers?
>
_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009



More information about the AccessD mailing list