Hi,
I have a .odb file that contains a number of Queries that all work fine. I added a new column headed " IHT 405" to the Table and populated it with single-character entries. I then made a new Query, copying exactly the content of one of the existing, working, Queries except that I changed the Field to "IHT405" (the original Field column is also populated with single-character entries).
I also retained the original "Group" selection in the Function field for the new Query and then tried to run it.
I got an error message "Not in aggregate function or group by clause"
Any assistance would be greatly appreciated.
CRB
[Solved] New Query gives error message
[Solved] New Query gives error message
Last edited by baxtec on Mon Aug 06, 2018 9:43 pm, edited 1 time in total.
CRB Open Office 4.1.5 Windows 10
Re: New Query gives error message
That is the reason you are receiving the error message.baxtec wrote:I also retained the original "Group" selection in the Function field for the new Query and then tried to run it.
Each column defined in your SELECT clause, OR your Visible line ( that is containing a check mark ) if using the GUI ( Graphic User Interface ) must EITHER:
- On the Function line be Group or Aggregate Function, such as SUM, Minimum, Maximum, Average etc
- Using 'raw' SQL, each Select column must either be a Aggregate Function, OR, in the Group by clause
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
Re: New Query gives error message
Hi Sliderule,
Many thanks for your prompt response. I think I already meet the rules you have specified, but as an 80-year old database newbie I could be wrong. I attach the details of both the existing working Query and the non-working new one in case that helps.
I would appreciate your further comments.
Thank you.
CRB
Many thanks for your prompt response. I think I already meet the rules you have specified, but as an 80-year old database newbie I could be wrong. I attach the details of both the existing working Query and the non-working new one in case that helps.
I would appreciate your further comments.
Thank you.
CRB
- Attachments
-
- 1808 06 Working Query_0001.pdf
- (88.5 KiB) Downloaded 199 times
-
- 1808 06 Non-working Query_0001.pdf
- (109.52 KiB) Downloaded 202 times
CRB Open Office 4.1.5 Windows 10
Re: New Query gives error message
In your Query, that is NOT working, UNCHECK on the Visible line for the Field When.
The reason, as in your Query that does work, that column is NOT Visible ( returned ) . . . or . . . part of the Select clause.
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
The reason, as in your Query that does work, that column is NOT Visible ( returned ) . . . or . . . part of the Select clause.
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
Re: New Query gives error message
Hi Sliderule,
Brilliant-you have fixed it! I appreciate your help very much.
Cheers,
CRB
Brilliant-you have fixed it! I appreciate your help very much.
Cheers,
CRB
CRB Open Office 4.1.5 Windows 10