Joining Queries

algram

New member
Local time
Today, 00:09
Joined
Apr 16, 2009
Messages
5
I have created 13 Different queries and have to post their results in one single form. Before I do this I know I have to merge the queries into a single query and use it as the forms' datasource. I've tried every tutorial I could find but am having trouble joining all the queries into one; they all have the same parameters

thanks and sorry if its a dumb or imprecise question
 
Try looking up Union Queries in Access Help. It sounds as if that is what you need.
 
thanks for the help I will try that
 
I have created 13 Different queries and have to post their results in one single form. Before I do this I know I have to merge the queries into a single query and use it as the forms' datasource. I've tried every tutorial I could find but am having trouble joining all the queries into one; they all have the same parameters

thanks and sorry if its a dumb or imprecise question


The description is a little vague, but here are two ideas.
  • If the Queries are all exactly the same (return the Exact Same Number of the Exact Same Types of Columns in the Exact Same Order), then a Union Query might be of use. Look that up and see if it helps you.
  • If they do not, then a Query that combines all of the requirements of the original Queries will need to be built. There is not enough information present to provide further assistance at this time.
Note: Rabbie said the same thing, but I thought it was important to point out that not only the parameters had to be the same, but the Return Values had to also be Exactly the Same. Good Luck
 
Last edited:
This sounds exactly like a problem I had a few weeks ago and was helped. Like they were saying above me, try a Union query. Here is the instructions that was given to me and it worked perfectly. In your case instead of 3 queries you will need 13. Also, I had to use brackets [ ] around my qry titles for it to work.


"Do three separate queries, each with only one column.

Then do a fourth Union query to combine the three..

In the design view of the fourth query, do to Query -> SQL Specific -> Union.

The code would look something like this.

select * from qry31_90
union
select * from qry91_180
union
select * from qryOver180;

Search for Union if you need more help, but I think that should put you on the right track. The operation you want to perform is a Union.

hope this helps.

Eric"



Just remeber 2 important things about union queries:
1) Each query that makes up the Union must have the same number of fields.
2) If you want to work with the data they must have the same data types also.
 
Thanks for the help; I was able to join the two parameters from the different queries, that only contain Text.

Both queries are made up of the sum of some criteria all coming from the same table.

See Attachment; Query1 is the sum of all the Cold Block Elements; and Query2 is the Sum of all the Warm Block Elements.

What I need to do is create a query that looks like Query3.

thanks again
 

Attachments

  • pregunta2.JPG
    pregunta2.JPG
    66.8 KB · Views: 113
Last edited:
Have you tried

Code:
Select * from Query1
 
Union
 
Select * from Query2;
 

Users who are viewing this thread

Back
Top Bottom