Results 1 to 2 of 2

Thread: Need Query Help

  1. #1
    Join Date
    Apr 2002
    Posts
    14

    Unanswered: Need Query Help

    I have two queries containing the following:

    Query1
    FIELD ID NO.
    1
    2
    3
    4

    Query2
    FIELD ID NO.
    3
    4
    5
    6

    How can I create a query based on Query1 and Query2 that will display the following results:
    Query3
    FIELD ID NO.
    1
    2
    3
    4
    5
    6

    Thank you,

    Alf

  2. #2
    Join Date
    Nov 2002
    Posts
    150
    Here's one way:

    SELECT Query1.<field>
    FROM Query1 LEFT JOIN Query2 ON Query1.<field> = Query2.<field>
    UNION
    SELECT Query2.<field>
    FROM Query2 LEFT JOIN Query1 ON Query2.<field> = Query1.<field>;

    where <field> is the name of the field in the table.

Posting Permissions

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