Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Union Query and Report (Access 2000)

    I have two queries that I need to join into one so I can create a report. I have joined them with the following:
    SELECT [NAME],[UNITS],[UNCERTAINTY],[COUNT] FROM [ExcelData]

    UNION SELECT [NAME],[UNITS],[UNCERTAINTY],[COUNT] FROM [RunData];

    For the report that I create from this query I would like to mark each record with which query it came from, is this possible.

    Thanks,

    Deni

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

    Re: Union Query and Report (Access 2000)

    You can add an extra field:

    SELECT [NAME],[UNITS],[UNCERTAINTY],[COUNT],"ExcelData" AS QueryName FROM [ExcelData]
    UNION
    SELECT [NAME],[UNITS],[UNCERTAINTY],[COUNT],"RunData" FROM [RunData];

Posting Permissions

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