473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ACCESS Query Calcs: Number

2 New Member
Former Access user trying to recall how I would do this in a query for a nonprofit furniture bank: I have related tables (extracted from super-old PFS files) with records of individual donor pickups that include, among others, the following fields: DateOfPickUp, DOW (day of week, e.g., "Monday", "Wednesday" , etc.), Area (of Pickup, e.g., "A", "B", "C", & "D"). I'm trying to calculate, for example, on how many Mondays (or Tuesdays, Wednesdays, etc.) did we schedule pickups in Area
"A" (or "B"...). From that, I can then determine (using a count of pickups for each day of the week divided by the aggregate number of times we scheduled pickups for any one day of the week) which days are most cost-effective to operate.
Oct 10 '06 #1
2 1895
sanniep
48 New Member
Former Access user trying to recall how I would do this in a query for a nonprofit furniture bank: I have related tables (extracted from super-old PFS files) with records of individual donor pickups that include, among others, the following fields: DateOfPickUp, DOW (day of week, e.g., "Monday", "Wednesday" , etc.), Area (of Pickup, e.g., "A", "B", "C", & "D"). I'm trying to calculate, for example, on how many Mondays (or Tuesdays, Wednesdays, etc.) did we schedule pickups in Area
"A" (or "B"...). From that, I can then determine (using a count of pickups for each day of the week divided by the aggregate number of times we scheduled pickups for any one day of the week) which days are most cost-effective to operate.
You could add a autonumber field to the table above then create a query with the DOP, DOW, Area and Autonumber field. Use the Group By Function and use Count on the autonumber field. Then you will have your number of pickups per day per Area.

You could aslo, if desired, make this query a crosstab query with the DOW and DOP as rowheader, the Area as Columnheader and the number of pickups (count of Autonumber) as value. This will result in the number of pickups per day with the Area as columnheader.

Sander
Oct 11 '06 #2
philfreer
2 New Member
You could add a autonumber field to the table above then create a query with the DOP, DOW, Area and Autonumber field. Use the Group By Function and use Count on the autonumber field. Then you will have your number of pickups per day per Area.

You could aslo, if desired, make this query a crosstab query with the DOW and DOP as rowheader, the Area as Columnheader and the number of pickups (count of Autonumber) as value. This will result in the number of pickups per day with the Area as columnheader.

Sander
Sander, thanks. That answered another problem I was experiencing, but I think that I didn't write up the problem correctly. What I'm trying to do is calculate how many, for example, Mondays did I shedule pickups in Area "A", not how many pickups were performed. Inotherwords, during a 1 year period, how many Mondays were spent in Areas "A", or "B", etc. regardless of the number of pickups that were performed. Again, thanks, Phil.
Oct 11 '06 #3

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

Similar topics

14
5397
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB 7.2 environment, the choices the optimizer makes often seem flaky. But this last example really floored me. I was hoping someone could explain why...
5
3002
by: Bec | last post by:
I'm in desperate need of your help.. I need to build an access database and have NO idea how to do this.. Not even where to start.. It IS for school, and am not asking anyone to do my homework for me.. I am merely asking for help, perhaps pointers as to where to begin.. I've never used access before.. I'm rather cluey when it comes to
1
5155
by: Brad | last post by:
Thanks for taking the time to read my question. I have a table of data that has Date, Data and Category. I need to show, in a report, each Categories Data by Date. The Date has to be it's own column across the top and Category down the left side. As data is entered, the number of unique dates increases. As a result the
8
9619
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query work from
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.