Solved

Query is Too Complex Errror (Count Sections\Summary Report of Multi-Union Query)

Posted on 2013-02-06
3
467 Views
Last Modified: 2013-02-06
So hey guys, thanks again for all the help on the Multi-Union query that I got going now.

I need now to be able to create a Summary report (count all the sections) like this:

Category                            Counts
Active Provider Sites         ###
Active Distinct Providers  ###
Active Distinct Vendors    ###

etc.
etc.
etc.

When I create a query off of the Aliased table I created for the Multi-Union query it gives me this error:
#2Query is Too Complex Error
0
Comment
Question by:IEHP1
  • 3
3 Comments
 

Author Comment

by:IEHP1
ID: 38860651
So I made separate Count queries for each section and the Counts all match, but how would I get the Categories as one column and the Counts as the second column?
0
 

Accepted Solution

by:
IEHP1 earned 0 total points
ID: 38860702
OK so I plan to just keep Unioning off of this SQL structure I created:

SELECT ['Provider Network Snapshot Counts'].Category, ['Provider Network Snapshot Counts'].Counts
FROM (
SELECT  "Active Provider Sites" AS Category, Count([Qry_Provider Network Active Sites Snapshot].Count) AS Counts
FROM [Qry_Provider Network Active Sites Snapshot])
AS ['Provider Network Snapshot Counts']
ORDER BY Category;
0
 

Author Closing Comment

by:IEHP1
ID: 38860922
got it!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now