jd_boss_hogg
Registered User.
- Local time
- Tomorrow, 00:16
- Joined
- Aug 5, 2009
- Messages
- 88
Hi All,
I'm getting the 'not part of aggregate function' error on a SQl. After looking through previous posts, i can see that it's because i'm grouping some of my fields (using SUM) but not others. The trouble i have, is i don't understand what i have to do with them in the SQL.
I have a report which has a few fields in the header that calculate some sum values. Further down the report, i then want to list these individually in the 'details' section of the report, grouped by [worktype].
Here is the simplified version of the code...
[/FONT]
So, how can i use [customer] and [name] in the details section of the report, because at the moment i get the 'not part of aggregate function' error?
Hoping someone can shed some light ! Thanks in advance...
I'm getting the 'not part of aggregate function' error on a SQl. After looking through previous posts, i can see that it's because i'm grouping some of my fields (using SUM) but not others. The trouble i have, is i don't understand what i have to do with them in the SQL.
I have a report which has a few fields in the header that calculate some sum values. Further down the report, i then want to list these individually in the 'details' section of the report, grouped by [worktype].
Here is the simplified version of the code...
Code:
[FONT=Calibri]SELECT
[/FONT]
[FONT=Calibri]Sum (IIf (([jb-2001].WORKTYPE="Chrome Mask") , [jb-2001].NET, 0 )) AS Glass1, [/FONT]
[FONT=Calibri] [/FONT]
[FONT=Calibri]Sum (IIf (([jb-2001].WORKTYPE="Chrome Mask") , [jb-2001].NET, 0 )) AS Glass2,[/FONT]
[FONT=Calibri]
[/FONT]
[FONT=Calibri][customer], [name]
[/FONT]
[FONT=Calibri]
[/FONT]
[FONT=Calibri]FROM [jb-2001];[/FONT]
[FONT=Calibri]
So, how can i use [customer] and [name] in the details section of the report, because at the moment i get the 'not part of aggregate function' error?
Hoping someone can shed some light ! Thanks in advance...