I have a query in Access 2007 that I am trying to run where it will only return 1 instance of the ID Field, and thought that GROUP BY was the way to go, but whenever I run it I am getting "You tried to execute a query that does not include the specified expression "Issue_ID" as part of an aggregate function."
Here's my query:
_________________
SELECT
Issues.ID, commenthistory.Issue_ID, commenthistory.Comment, commenthistory.Comment_Date, Issues.Title, Issues.[Assigned To], Issues.[Opened By], Issues.[Opened Date], Issues.Status, Issues.Priority, Issues.Description, Issues.Due_Date, Issues.[Related Issues], Issues.Comments, Issues.CMEMO, Issues.Model, Issues.Init_STE, Issues.Final_STE, Issues.TCON, Issues.Tech, Issues.Vendor, Issues.Location, Issues.Category
FROM Issues, commenthistory
WHERE ( ((([commenthistory]![Comment_Date]) Between Now() And Now()-7)) AND commenthistory.Issue_ID = Issues.ID)
GROUP BY (Issues.ID);
_______________
I tried putting a join between issues and commenthistory in the query builder, but also had problems with the Group by.
Any help would be greatly appreciated!
Thanks
Here's my query:
_________________
SELECT
Issues.ID, commenthistory.Issue_ID, commenthistory.Comment, commenthistory.Comment_Date, Issues.Title, Issues.[Assigned To], Issues.[Opened By], Issues.[Opened Date], Issues.Status, Issues.Priority, Issues.Description, Issues.Due_Date, Issues.[Related Issues], Issues.Comments, Issues.CMEMO, Issues.Model, Issues.Init_STE, Issues.Final_STE, Issues.TCON, Issues.Tech, Issues.Vendor, Issues.Location, Issues.Category
FROM Issues, commenthistory
WHERE ( ((([commenthistory]![Comment_Date]) Between Now() And Now()-7)) AND commenthistory.Issue_ID = Issues.ID)
GROUP BY (Issues.ID);
_______________
I tried putting a join between issues and commenthistory in the query builder, but also had problems with the Group by.
Any help would be greatly appreciated!
Thanks