Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL - Using 'HAVING' to select MAX of a column I created earlier.

Status
Not open for further replies.

nickodvz

IS-IT--Management
May 24, 2008
5
AU
Ok, I'm pretty new to this stuff - but I need a bit of help.
Here is my query so far:

SELECT Collars.Date, Count(Collars.Date) AS [CountofDate]
FROM Collars
GROUP BY Collars.Date
HAVING max(countofdate);

But, it comes up with a 'Enter Parameter Value' box. I sort of get what its doing - it isn't finding the 'CountofDate' column I made earlier right? Well what do I need to do?
Thanks.
 
Hold on, maybe I've got it wrong.
What I want to do is, select the maximum number of jobs done in a day (each job has its own entry, so there are multiple entries of the same date, I want to count how many times each date is there - and then select the max from this) how do I do this in one query? I can't remember, is there a way to create a temporary table?
Thanks again.
 
This is the ANSI SQL forum, and by your post it seems you are working with Access. You should post this on the correct forum, probably forum709.

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top