Results 1 to 7 of 7
  1. #1
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875

    Concatenate Query Results

    Hey all!

    Is there a way to get the results of a query and then stick them in with the results of another query using only SQL?

    For example, I have the following query:
    Code:
    SELECT [PartID], [PartDesc] FROM PartMasterOTHER
    And this Query:
    Code:
    SELECT [PartID], [PartDesc] FROM PartMasterGLASS
    Now let's say that Query A (PartMasterOTHER) returns this:
    Code:
    PartID|PartDesc
    T101|Terminator!
     T800|Sneeky Terminator!
     T9000|Liquid Terminator!
     TX|HAWT Terminator!
    And Query B (PartMasterGLASS) returns this:


    Code:
    PartID|PartDesc
     001|3mm Clear Glass
       002|4mm Clear Glass
       003|5mm Clear Glass
    How can I get the result:
    Code:
    PartID|PartDesc
     001|3mm Clear Glass
       002|4mm Clear Glass
       003|5mm Clear Glass
    T101|Terminator!
     T800|Sneeky Terminator!
     T9000|Liquid Terminator!
     TX|HAWT Terminator!
    Note that I'm NOT looking for the Cartesian product.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    A UNION Query will do as you asked.

  3. #3
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Unacceptable!

    The solution must be moar harder!

    >.<

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Okay, you *must* create the UNION Query with your eyes closed.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    A UNION Query is also Read Only if that make a difference.

  6. #6
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Having a Read-only Query is Fine. I only need it for a selection list Combo Box.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Is this thread ready for you to use the Thread Tools and mark as Solved?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  2. Using a query to concatenate data
    By ocampod in forum Queries
    Replies: 15
    Last Post: 03-20-2012, 08:11 AM
  3. concatenate
    By stephenaa5 in forum Programming
    Replies: 2
    Last Post: 10-11-2010, 05:18 PM
  4. Query results in subform
    By MWMike in forum Forms
    Replies: 5
    Last Post: 09-28-2010, 05:19 PM
  5. Query results order
    By Costa in forum Queries
    Replies: 6
    Last Post: 02-24-2010, 06:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums