Re: field not equal

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I think you have mixed up your references to Queries 1, 2, and 3.

If you want Query1 to return all the records from Query3 that do not have a
match in Field1 of Query2, then you can do it one of several ways. You
might want to test both methods to determine which is quickest in your
situation.

1. SELECT Query3.*
FROM Query3 LEFT JOIN Query2 ON Query3.Field1 = Query2.Field1
WHERE Query2.Field1 IS NULL

2. SELECT Query3.*
FROM Query 3
WHERE Query3.Field1 NOT IN (SELECT Query2.Field1 FROM Query2)

HTH
Dale

"neeraj" <neeraj@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:85B314D5-E51E-415B-9AB5-1191E5CA2FD1@xxxxxxxxxxxxxxxx
>I am creating a query , say Query1 in which I am joining 2 queries, say
> Query2 and Query3. I have joined them on a common field, say Field1.
> Values
> of Field1 are such that the set of these values in Query2 is a subset of
> that
> of Query1. I want Query1 to result only those records from Query1 where
> the
> field values of Field1 are not equal, that is present in Query1 and not in
> Query2.


.



Relevant Pages

  • Re: QuerySets in Dictionaries
    ... d= query1 ... d= query2 ... d= query3 ... Is there a way to do this that I'm missing? ...
    (comp.lang.python)
  • RadiobuttonList with headers
    ... I have a table with several horizontal radiobuttonlists like: ... Query1: O O O ... Query2: O O O ... Query3: O O O ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: QuerySets in Dictionaries
    ... d= query1 ... d= query2 ... d= query3 ... Is there a way to do this that I'm missing? ...
    (comp.lang.python)
  • QuerySets in Dictionaries
    ... I need to create a dictionary of querysets. ... d= query1 ... d= query2 ... d= query3 ...
    (comp.lang.python)
  • field not equal
    ... of Field1 are such that the set of these values in Query2 is a subset of that ... field values of Field1 are not equal, that is present in Query1 and not in ... Prev by Date: ...
    (microsoft.public.access.queries)