Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    173

    Unanswered: adding fields in multiple tables

    I have 3 queries each with the following fields:
    query1: serialcode1, amount3
    query2: serialcode2, amount2
    query3: serialcode3, amount2


    I'd like to combine these all into one query listing all records together in one long list. Is there a way to do this without creating some kind of table first? I'd like to have one query with only two fields listing all the info from the 3 queries.

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    try:

    SELECT serialcode1 AS serialcode, amount3 AS amount FROM Query1
    UNION ALL
    SELECT serialcode2 AS serialcode, amount2 AS amount FROM Query2
    UNION ALL
    SELECT serialcode3 AS serialcode, amount2 AS amount FROM Query3;

Posting Permissions

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