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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distinct Count in Access

Status
Not open for further replies.

shelby55

Technical User
Jun 27, 2003
1,229
CA
Hi

I have an Excel worksheet that I am querying from an Access query for. My Access database is of patients, one line per patient (so data isn't aggregate).

I want to show average number of patients per arrival hour. Arrival hour is already a field in the database.

Any assistance greatly appreciated - thanks.
 



Hi,
My Access database is of patients, one line per patient (so data isn't aggregate).
A well designed database/table generally will NOT have data aggregations. Aggregations occur when you perform a query.

Since you have one patient per row...
Code:
Select Count(*)/[Arrival Hour]




Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip

Thanks but when I do this and try to run it I get the error message "you tried to execute a query that does not include the specified expression "Count(*)/[Ahour]" as part of an aggregate function.

What does that mean? Thanks.
 



please post the entire SQL.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top