473,378 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Filtering, sorting, summing

19
Can someone help me with the syntax? I want to sum the hrs for each dept, name & ppe. Any help given will be much appreciated.
Thanks in advance.


Dept_# Name PPE Hrs
533 Empl Name 4/15/2006 0
533 Empl Name 4/15/2006 8
533 Empl Name 4/15/2006 8
533 Empl Name 4/15/2006 8
522 Empl Name 4/15/2006 8
522 Empl Name 4/15/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
Feb 6 '08 #1
2 1163
ck9663
2,878 Expert 2GB
Can someone help me with the syntax? I want to sum the hrs for each dept, name & ppe. Any help given will be much appreciated.
Thanks in advance.


Dept_# Name PPE Hrs
533 Empl Name 4/15/2006 0
533 Empl Name 4/15/2006 8
533 Empl Name 4/15/2006 8
533 Empl Name 4/15/2006 8
522 Empl Name 4/15/2006 8
522 Empl Name 4/15/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8

i believe GROUP BY is what you need...

-- ck
Feb 7 '08 #2
Can someone help me with the syntax? I want to sum the hrs for each dept, name & ppe. Any help given will be much appreciated.
Thanks in advance.


Dept_# Name PPE Hrs
533 Empl Name 4/15/2006 0
533 Empl Name 4/15/2006 8
533 Empl Name 4/15/2006 8
533 Empl Name 4/15/2006 8
522 Empl Name 4/15/2006 8
522 Empl Name 4/15/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8
540 Empl Name 4/30/2006 8

Select Dept_#, Name, PPE, Sum(Hrs) from Table_Name Group By(Dept_#)
Feb 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Yaroslav Bulatov | last post by:
I made an array of 10 million floats timed how long it takes to sum the elements, here's what I got (millis): gcc -O2: 21 Python with numarray: 104 Python with Numeric: 302...
1
by: Elias Farah | last post by:
Hello All, I hope someone can give me (and other keen access enthusiasts) some helpful information to explain how to most efficiently filter Queries & subqueies. Consider this common simple...
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
2
by: Aravind | last post by:
Hi folks. I have a form, frmHistory, which has 4 command buttons: Sort Title (cmdSortTitle), Sort Name (cmdSortName), Due Today (cmdDueToday), and Due List (cmdDueList). Sort Title and Sort...
2
by: Alan Searle | last post by:
I would like to use an XSL/HTML template to sort XML data dynamically on the client side. As it is, I found a tutorial showing how to do this on the following site ... ...
0
by: ber.janssens | last post by:
Hi, I am trying the new ObjectDataSource from ASP.NET 2.0. I connected a Gridview with ObjectDataSource which is connected to a webservice which returns a DataSet. In the Webmethod I return...
5
by: LDD | last post by:
Hi Folks I'm trying to determine a way to handle paging, filtering and sorting in a datagrid. If I choose to filter and sort, I'd like to return a subset. If that resultset has more records...
10
by: Sjaakie | last post by:
Hi, I'm, what it turns out to be, fooling around with 3-tier design. At several websites people get really enthusiastic about using custom dataobjects instead of datasets/-tables. While trying to...
3
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be...
0
by: Yarik | last post by:
Hello, Here is a sample (and very simple) code that binds an Access 2003 form to a fabricated ADO recordset: ' Create recordset... Dim rs As ADODB.Recordset: Set rs = New ADODB.Recordset '...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.