Union Query Based on Two Crosstab Queries

R

ryguy7272

Is it possible to do a union query based on two crosstab queries? I have 639
records in one crosstab query and 225 records in another crosstab query, for
a total of 864 records. When I build a union query, based on those two
queries that I just mentioned, I get a total of 620 records.

The SQL seems extremely simple, but I just can't seem to get that magic 864
number:

SELECT * FROM qryAdvJolietCurrentQ
UNION SELECT * FROM qryAdvJoiletNextQ;

Any help is appreciated!!


Thanks,
Ryan--
 
B

Bob Barrows [MVP]

ryguy7272 said:
Is it possible to do a union query based on two crosstab queries? I
have 639 records in one crosstab query and 225 records in another
crosstab query, for a total of 864 records. When I build a union
query, based on those two queries that I just mentioned, I get a
total of 620 records.

The SQL seems extremely simple, but I just can't seem to get that
magic 864 number:

SELECT * FROM qryAdvJolietCurrentQ
UNION SELECT * FROM qryAdvJoiletNextQ;

I'm surprised you are being allowed to run this ... unless you are
selecting specific columns from your crosstabs in each of these source
queries ...

Anyways, when you use UNION, duplicate results are eliminated.
Try using UNION ALL
 
R

ryguy7272

I have three Access books, each of which have a little over 1,200 pages, and
I don't believe any of them describe any uses of Union All. I believe the
books are great for learning the fundamentals of Access, but for very
specific questions, this discussion group is much more valuable than $170
worth of books.

Thanks again Bob!
Ryan---
 
B

Bob Barrows [MVP]

Well ... there's always online help. Yes, MS had made it nearly unusable
compared to the A97 help, but if you go to the Table of Contents and
expand the Jet SQL Reference node, you should find the description of
UNION in

Microsoft Jet SQL Reference ->
Data Manipulation Language ->
UNION
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top