dbTalk Databases Forums  

Not part of an aggregate function

comp.database.ms-access comp.database.ms-access


Discuss Not part of an aggregate function in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Shaw
 
Posts: n/a

Default Not part of an aggregate function - 05-15-2004 , 03:39 PM






Can someone tell me how to get around this? When I include "[Command
Structure].UNIT" in this query, I get the "UNIT not part of an
aggregate query" message. When I take it out, the query runs fine.
Unfortunately, I really need that field in my query results.

Thanks in advance.

SELECT PMARS_Data_Trimmed.UIC3, Sum(CInt(PMARS_Data_Trimmed.IDT)) AS
IDT_Participation, [Command Structure].UNIT, [Command Structure].MSC,
(Sum(CInt(PMARS_Data_Trimmed.Strength))*4) AS IDT_Potential,
Sum(CInt(PMARS_Data_Trimmed.IDT))/(Sum(CInt(PMARS_Data_Trimmed.Strength))*4)
AS IDT_Participation_Rate
FROM PMARS_Data_Trimmed INNER JOIN [Command Structure] ON
PMARS_Data_Trimmed.UIC3=Mid$([Command Structure].UIC,2,3)
GROUP BY PMARS_Data_Trimmed.UIC3, [Command Structure].MSC
ORDER BY PMARS_Data_Trimmed.UIC3;

Reply With Quote
  #2  
Old   
John Shaw
 
Posts: n/a

Default Re: Not part of an aggregate function - 05-16-2004 , 05:53 AM






Thank you, Noam!

I didn't realize that nor do I understand why it is. But it worked!

John

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.