Re: is there a "does not include" query in Access

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



You can use the (Not) In operator or the (Not) EXISTS Clause.
Alternatively, you can simple use a Left Outer Join like:

****Untested****
SELECT C.ClientID, ....
FROM tblClient AS C LEFT JOIN
(
SELECT DISTINCT Sub.frg_ClientID
FROM tblWorkIn
WHERE {Your Date Criteria}
) AS W
ON C.ClientID = W.frg_ClientID
WHERE W.frg_ClientID Is Null
****

Check the JET Reference on the In operator and the EXISTS cluase also.

--
HTH
Van T. Dinh
MVP (Access)


"cherylw" <cherylw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:88BBFB7C-B66D-4BF4-82A0-7B248B6EA690@xxxxxxxxxxxxxxxx
> I am using Access 2000 and have a database with a Clients table (client #
is
> primary key, then includes name, address, phone...) and a Work In table
> (keeps track of when we receive each months work for each client). I need
to
> create a report that shows me which clients we have not received work for.
> Is there someway I can setup a query to find all clients that do not
include
> Work In for a specified month??
>
> Any help is appreciated.
>
> Thank you!!
>
> Cheryl W.


.



Relevant Pages

  • Access2k + SQL 7.0 Lock problem
    ... I have an Access database which has tables linked to SQL Server 7.0 ... Clients ... SummaryMaxDate INNER JOIN ... SummaryMaxDate.ClientKey = Clients.ClientKey LEFT OUTER JOIN ...
    (microsoft.public.access.queries)
  • Re: Reconcilliation
    ... tables doing a left outer join will give u the result ... out if any of the tables are missing records for any of the clients ... > TFees ... > TUsers ...
    (microsoft.public.sqlserver.programming)
  • Re: Newbie: Select records in Table A not in Table B
    ... You use an Outer Join to do this. ... "Terry" wrote in message ... I have another table B of actual clients. ... > potential clients only. ...
    (microsoft.public.access.queries)
  • Re: CROSS JOIN
    ... > was that depreciating the original FROM .. ... WHERE syntax would never ... > The problem is that the WHERE clause is done after the FROM clause. ... but thats just outer join stuff. ...
    (comp.databases)
  • Re: Performance degradation with view and "left outer join" vs. "from x, outer y"
    ... Turned Every Which Way But Loose", I reminded the attendees that the ANSI SQL '92 parsing rules REQUIRE that filters in the WHERE clause of a query MUST be processed POST-JOIN in order for an RDBMS to be compliant. ... That means that your filter, c.custid = "AB1234", is applied after all rows of the customer table have been LEFT OUTER JOINed to the my_view VIEW with the results stored into a temp table. ... Now if I use the informix extended outer join syntax: ...
    (comp.databases.informix)