Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2013
    Posts
    2

    Unanswered: Hi, having trouble with a UNION query.

    Hi, my name is Mike. I have a question about my homework I'm doing. Below is a question about Microsoft Access and doing a UNION query. The question is, "Create the table that results from applying a UNION relational operator to the tables shown below. In my book it explains that to use a union, " the tables must have the same attribute characteristics; in other words, the columns and domains must be compatible." Between the two tables, to me they don't look compatible at all, the BOOTH_PRODUCT, BOOTH_PRICE, MACHINE_PRODUCT, and MACHINE_PRICE don't even look like they could go together. Is there anyone here that could help me if I'm wrong, I'm not looking for the answer, just some advice. I do know that a UNION combines the two tables but, I don't even know what the output table would like. I hope the diagram below makes sense, and thanks in advance for input.

    Table name: BOOTH

    BOOTH_PRODUCT BOOTH_PRICE
    chips 1.5
    Cola 1.25
    Energy Drink 2


    Table name: MACHINE

    MACHINE_PRODUCT MACHINE_PRICE
    Chips 1.25
    Chocolate Bar 1
    Energy Drink 2

  2. #2
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    In your select query for Booth add a column Machine_price and leave this null. In your select query for Machine add a column Booth_price. Then use an Union query to join the two queries and leave this null.

  3. #3
    Join Date
    Sep 2013
    Posts
    2
    Quote Originally Posted by Poppa Smurf View Post
    In your select query for Booth add a column Machine_price and leave this null. In your select query for Machine add a column Booth_price. Then use an Union query to join the two queries and leave this null.
    Thank you for your reply Poppa Smurf, I really appreciate it. We are supposed to write out what the table will show/look like, I'm not putting this into a actual Access program. I'm not seeing the result of the query in my mind, and how this would look in table. Again I really appreciate your reply.

  4. #4
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    Your final table would look like
    Product
    Booth_price
    Machine Price

Posting Permissions

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