473,786 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query Puzzle Access 2000

Hi all,

I have a query at the moment which shows what people have been doing on
a certain department throughout an entire shift. It shows the start (Min)
time and end (Max) time and then shows total time doing the job. I have now
been asked if I can get it to show what they have been doing hour by hour.

so the format would need to be something along the lines of :

Date Start End Forname Surname Login Ctns Diff
06/02/04 06:00 06:59 Sam Smith 38965 26 0:59
06/02/04 07:00 07:59 Sam Smith 38965 35 0:59
06/02/04 08:00 08:59 Sam Smith 38965 32 0:59

Can anyone shed any light on the best way of doing this?

Cheers,

Mark
Nov 12 '05 #1
3 1548
How about using the query as the record source for a report, and do a
group on the time field by hour?

-Paul

"Mark Reed" <ma*********@nt lworld.com> wrote in message news:<1V******* ******@newsfep1-gui.server.ntli .net>...
Hi all,

I have a query at the moment which shows what people have been doing on
a certain department throughout an entire shift. It shows the start (Min)
time and end (Max) time and then shows total time doing the job. I have now
been asked if I can get it to show what they have been doing hour by hour.

so the format would need to be something along the lines of :

Date Start End Forname Surname Login Ctns Diff
06/02/04 06:00 06:59 Sam Smith 38965 26 0:59
06/02/04 07:00 07:59 Sam Smith 38965 35 0:59
06/02/04 08:00 08:59 Sam Smith 38965 32 0:59

Can anyone shed any light on the best way of doing this?

Cheers,

Mark

Nov 12 '05 #2
Mark Reed wrote:
Hi all,

I have a query at the moment which shows what people have been doing on
a certain department throughout an entire shift. It shows the start (Min)
time and end (Max) time and then shows total time doing the job. I have now
been asked if I can get it to show what they have been doing hour by hour.

so the format would need to be something along the lines of :

Date Start End Forname Surname Login Ctns Diff
06/02/04 06:00 06:59 Sam Smith 38965 26 0:59
06/02/04 07:00 07:59 Sam Smith 38965 35 0:59
06/02/04 08:00 08:59 Sam Smith 38965 32 0:59

Can anyone shed any light on the best way of doing this?


Maybe, maybe not. I will assume that each ctns has a date/time stamp on it.
If so, I would be grouping the values by Login, date, Hour. IOW, add 2 more
columns to group by.
GroupHour:Forma t(DateTimeField ,"h")

The reason to group by date is if people work a second or third shift and hours
go across a day.

The only problem would be the start time for the first record. You could group
also on the Max time and Min time for each hour....I bring this up because a
person may start late, leave early, have a power outage, etc.

Nov 12 '05 #3
Thanks for the advice,
I have managed to do this by adding the following field to my query
DatePart("h",[time]) AS hr

I have then created another table with 2 fields..... Date part and Time
period.

The data looks something like

Date part Time period
0 00:00 - 01:00
1 01:00 - 02:00

I have then created another query from the first query and the new table,
then linked them by the datepart.

the result gives the a time period of activity along with the start and end
time within that period then the sum of Ctns and the total time worked
within that hour.

Mark

"Salad" <oi*@vinegar.co m> wrote in message
news:40******** ******@vinegar. com...
Mark Reed wrote:
Hi all,

I have a query at the moment which shows what people have been doing on a certain department throughout an entire shift. It shows the start (Min) time and end (Max) time and then shows total time doing the job. I have now been asked if I can get it to show what they have been doing hour by hour.
so the format would need to be something along the lines of :

Date Start End Forname Surname Login Ctns Diff
06/02/04 06:00 06:59 Sam Smith 38965 26 0:59
06/02/04 07:00 07:59 Sam Smith 38965 35 0:59
06/02/04 08:00 08:59 Sam Smith 38965 32 0:59

Can anyone shed any light on the best way of doing this?
Maybe, maybe not. I will assume that each ctns has a date/time stamp on

it. If so, I would be grouping the values by Login, date, Hour. IOW, add 2 more columns to group by.
GroupHour:Forma t(DateTimeField ,"h")

The reason to group by date is if people work a second or third shift and hours go across a day.

The only problem would be the start time for the first record. You could group also on the Max time and Min time for each hour....I bring this up because a person may start late, leave early, have a power outage, etc.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3765
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET actiavted Access 2002 mdb file (and yes, proper rights are set on TMP paths and path,
5
3131
by: Ken Lindner | last post by:
We have a report based on a query that is called from a form. Nothing too special here. The query has 3 coulmns that are populated directly from values entered into entry fields on the form that calls the report using syntax such as "StartDate: !!" in the field value of the column. This also reads as "!! AS StartDate" in the SQL design view.
8
6463
by: Adam Louis | last post by:
I would like help resolving this problem. I'm a novice who's been hired to query a hospital database and extract useful information, available to me only in a dynamically generated, downloadable .mdb. The query below query runs correctly and without error, but any attempt to save it causes Access to crash without a message, leaving the .ldb file. Opening the DB reveals it saved a blank "query1". I've upgraded to Jet SP 8, and I'm running...
1
5342
by: Stefan V. | last post by:
Hello! I am trying to convert a query written for SQL Server 2000 database tables, to a MS Access query. Here is what I have in SQL Server: SELECT t2.*, CASE WHEN t2.QType = '3' THEN t1.Note ELSE CASE WHEN t2.QType = '2' THEN CASE WHEN CONVERT(varchar(100), t1.ANumber) = '1' THEN 'Yes' ELSE 'No' END ELSE CASE WHEN CONVERT(varchar(5), t2.Qnumber)+'.' +
0
1825
by: LesM | last post by:
This is a change of behaviour between Access 2000 SP3 and Access 2002 SP3. I have Progress table that is linked via ODBC into Access using OpenLink Lite for Progress 9.0b. For over a year, using Access 2000 under Win98, I have been running a Make Table or Append query against this ODBC table and producing an extracted Access table. Any fields that are NULL on the source ODBC table show as NULL on the output table. The query also has an...
12
2323
by: Joe Stanton | last post by:
Hello Group I have a query that works in Oracle and SQL Server, but fails in Microsoft Access. The query is: SELECT data fromTABLE1 WHERE data>='A&' AND data<'A''' Here is my sample data:
12
34839
by: Bookreader | last post by:
I tried Googling this but I get a whole lot of replies about running the SQL statement in VB via ADO. All I want to do is run an existing ACCESS 2000 query from VB with no information returned to VB. I am presuming that I would use Automation somehow. Thanks in advance.
2
4436
by: ILCSP | last post by:
Hello, I'm in the process of changing our 'normal' Access 2000 update queries to Update Pass Through Queries. We have a SQL server 2000 database and we're using an Access 2000 database as our front end. In the criteria of one of our update query fields, we use both the isnull(field1) and Not IsNull(field2) then Field3, otherwise, set the updated field as null. Here's my converted Pass Through Query : UPDATE Vsel SET VSel.Cert1 =...
2
2891
by: ILCSP | last post by:
Hello again, I'm still in the process of changing ms access queries to Pass through queries. We're using a SQL Server 2000 database with an Access 2000 DB as our front end. I trying to convert this ms access query to a pass through and I'm having quite a hard time doing it, so I hope you guys can help me. I have a clients form and in this form there are 2 combo boxes where a user can select a client's Type and Status. One for each. ...
0
9647
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9496
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6745
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.