Results 1 to 2 of 2
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Question about Full Outer Joins (2003)

    Let's say you have Query1 with fields ID, Field1, Field2 and Field3, and QueryA with fields ID, FieldA, FieldB and FieldC.

    1) Create a query based on Query1 and QueryA.
    Join them on ID.
    Double click the join line and select the option to include all records from Query1.
    Add ID, Field1, Field2, Field3 from Query1 and FieldA, FieldB and FieldC from QueryA to the query grid.
    Save as (for example) qryJoin1.

    2) Create a query based on Query1 and QueryA.
    Join them on ID.
    Double click the join line and select the option to include all records from QueryA.
    Add ID from QueryA, Field1, Field2, Field3 from Query1 and FieldA, FieldB and FieldC from QueryA to the query grid.
    Save as (for example) qryJoin2.

    3) Create a query but don't add any tables.
    Select View | SQL.
    Enter the following SQL:

    SELECT * FROM qryJoin1
    UNION
    SELECT * FROM qryJoin2

    Save as (for example) qryUnion.
    Switch to datasheet view to see the result.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question about Full Outer Joins (2003)

    If I have two queries and I want everything from one query and everything from the other query but the two queries have different fields except for the key fields. I want some fields from each of the queries that aren't in both queries. Is this possible? I have unioned two queries where both queries had the same data fields but what if you had other fields from both queries that you wanted to include in the final query?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •