Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 474
  • Last Modified:

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

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
IEHP1
Asked:
IEHP1
  • 3
1 Solution
 
IEHP1Author Commented:
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
 
IEHP1Author Commented:
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
 
IEHP1Author Commented:
got it!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now