You can use a SQL statement to quickly summarize data in a
table. For example, suppose you need to create a report showing the total
number of hours each employee worked over a quarter. Follow these steps:
the database containing the HoursWorked table
for the quarter, then click Queries in the objects list in the database
New, Design View and OK.
- Go to
Query | SQL Specific | Data Definition.
the following statement:
SELECT DISTINCTROW [HoursWorked].[Employee ID],
SUM([Hours Worked].Hours) AS [Sum of Hours]
FROM [Hours Worked]
GROUP BY [Hours Worked].[Employee ID];
The results will show total hours worked grouped by Employee
ID. This query can be saved and used to create the quarterly report.
Miss a tip?
Check out the Microsoft Access archive, and catch up on our most recent Access tips.
Help users increase productivity by automatically signing up for TechRepublic’s free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.