Re: Query problem

From: Marshall Barton (marshbarton_at_wowway.com)
Date: 02/20/04


Date: Fri, 20 Feb 2004 08:51:50 -0600

Poppy wrote:

>I have 2 tables, each which contain usernames and id's.
>
>I need to extract all users from tableA which do not appear in tableB but
>cant figure out the syntax of the query.

SELECT tableA.*
FROM tableA LEFT JOIN tableB
        ON tableA.user = tableB.user
WHERE tableB.user Is Null

-- 
Marsh
MVP [MS Access]


Relevant Pages

  • Re: Problem with Dual subselect
    ... So I've constructed a UNION QUERY as follows. ... FROM TABLEA AS A ... B.STATUS_DATE FROM [TABLEB] As B ... A Lookup property on the foreign-key field ...
    (microsoft.public.access.queries)
  • Re: use a result as a FIELD in the design grid
    ... I have a key TableA that maps each station's flow (and ... Station: FlowField: TankLevel: PumpRun: ... OK, now from the previous query, I know that the FlowField ... So in a new query grid where TableA is linked to TableB ...
    (microsoft.public.access.queries)
  • Re: Advanced query issue
    ... and then write a query linking just by your new ... FROM tablea As a RIGHT JOIN tableb as b ... That assumes tableb has all the possible occurrence of the two ... I also used UNION ALL, ...
    (microsoft.public.access.queries)
  • Re: Finding matching records
    ... >> An inner join in a query will return only records where the join ... Suppose you have two tables, TableA and TableB, with these fields: ... A_ShouldMatch has a match in the B_ShouldMatch field in TableB. ... create a new query in Design View and add both TableA and TableB to the ...
    (microsoft.public.access.modulesdaovba)
  • Re: Help with INSERT
    ... If tableA has three records, a, b, and c, while tableB as four records, 1, ... from a SELECT query, no obligation to necessary use a table). ... > I'm very new to Access, and trying to learn SQL at the same time. ...
    (microsoft.public.access.queries)