Query Too Complex?

Hello I have the following query in a Microsoft Access database:

SELECT Count(*) AS Total_Record, Sum(IIf([Reprint Edition] Like 'get*',1,0)) AS Eligible, Sum(IIf([Reprint Edition] Like 'get*' And [Reviewed Item] Like 'exc*',1,0)) AS FT_Excluded, Sum(IIf([Reprint Edition] Like 'dng*',1,0)) AS Excluded, Sum(IIf([Reviewed Item] Like 'inc*',1,0)) AS FT_Included, Sum(IIf([Reprint Edition] Is Null,1,0)) AS RE_Null, Sum(IIf([Notes] Is Null,1,0)) AS Notes_Null, Sum(IIf([Reprint Edition] Like UNC,1,0)) AS RE_UNC

After adding "Sum(IIf([Reprint Edition] Like UNC,1,0)) AS RE_UNC"
I am getting the error that the 'Query Is Too Complex'.  I'm not really sure what this means nor do I know how to fix it.  Can anyone help?

Bevo
BevosAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
cyberkiwiConnect With a Mentor Commented:
http://allenbrowne.com/subquery-02.html
Error: "Query too complex"
JET gives this generic message any time it cannot pinpoint what's wrong. The cause can be wrong delimiters, misinterpreted data types, mismatched brackets, using reserved words as table or field names or aliases, confusion from Name AutoCorrect, or a host of other possibilities.

Is UNC really a column, or did you mean to quote it (as a string) in "Sum(IIf([Reprint Edition] Like UNC,1,0)) AS RE_UNC" ?
0
 
BevosAuthor Commented:
Hi cyberkiwi, unc is field value for [Reprint Edition].  I tried to change it to "Sum(IIf([Reprint Edition] Like 'UNC*',1,0)) AS RE_UNC;" but that does not work as well.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPConnect With a Mentor Commented:
It would help to see the complete SQL statement.

Is there only one table or query in the FROM clause?

0
 
BevosAuthor Commented:
Haha, I'm an idiot. I didn't include the FROM cause.  I'm gonna give you both some points and my God have mercy on my soul.

Bevo
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Glad we could assist.
0
All Courses

From novice to tech pro — start learning today.