Re: field not equal
- From: "Dale Fye" <dale.fye@xxxxxxxxxx>
- Date: Fri, 9 Sep 2005 22:13:09 -0400
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.
.
- Follow-Ups:
- Re: field not equal
- From: neeraj
- Re: field not equal
- References:
- field not equal
- From: neeraj
- field not equal
- Prev by Date: Re: Need HELP to limit number of records per individual
- Next by Date: Re: sum fields and then average them
- Previous by thread: field not equal
- Next by thread: Re: field not equal
- Index(es):
Relevant Pages
|