Similar Threads:
1.HAVING / Where time count / excluding any instance
Greetings this almost New Year's Eve,
I have a set of data with open and close dates (for one person). I want to
calculate the duration the person was open. But I can't do [close] - [open]
because some of the closures are errors--you can identify an error if the
next open date is the next month. For example, 5/16/2000 closures is an
error--because reopened 6/27/2000. So really, I want to subtract 1/1/2000
date from final closure of that period--which is 4/25/02
Open Close
2/15/1990 4/20/1992
8/1/1995 11/12/1995
1/1/2000 5/16/2000
6/27/2000 12/7/2001
1/4/2002 4/25/2002
3/14/2004 10/17/2004
6/4/2005 11/30/2005
Any thoughts on how to do this?
Here's what I've tried:
1) labeling closures as "bad" or "good" -- if "open date - 30 days < closure
date", then label closure date as "bad". Then I have an array--
5/16/2000 good
5/16/2000 good
5/16/2000 bad ---showing the one time where it closed & reopened
5/16/2000 good
and I'd need to then do a query eliminating a date that has _any_ "bad"
labels (I just submitted a question about this, since my HAVING clause isn't
working properly)
and final step -- subtract open date from smallest close date that is "good".
Any thoughts on a faster/better way to do this? (such as saying "if there's
_any_ open date that's up to 30 days > than the close date, then don't use
that close date in the time duration calculation.
Thank you.
2.Count person only 1 time and show person not counted
A manager needs to sit with each of their employees once a quarter. In the
past, we have said if a manager has 8 employees, they need to have 8 sit
alongs each quarter.
The problem with this is, it does not take into account that a manager may
sit with one person two times and not at all with another employee. So the
manager has 8 sit alongs, but actually only sat with 7 employees. How can I
build a query to only count a person 1 timer per quarter and to also show a
person on the same report that did not get a sit along.
The report for this should list the manager and all of his employees under
him, like this.
Manager Qtr 1 Qtr2 Qtr 3 Qtr 4 YTD
Employee1 1 1 0 1 3
Employee2 0 0 0 0 0
Employee3 1 1 1 1 4
3.how to get count(col1), count(col2), count(sol3) with only one query
Hallo everybody!
I have in a table three columns with boolean values. So I can get the number
in a column:
SELECT count(col1)
FROM tbl where col1=true
Is it possible to get count(col1), count(col2), count(sol3) with only one
query? In every
column should be considered only true values (col1=true, col2=true,
col3=true)
Thanks for your ideas!
Mario
4.Counting how many times a button is pressed
Hello All,
I have a form that has a command button on it that prints a letter for the
record that it is on.
What the user wants is a report that shows how many times the button was
clicked within a specified date range.
I am thinking that I need to do an event on the ON Click for the button.
But how do I do that? Do I need to have a seperate table to store the date
and a number then tell a query to count it for the report?
Any help would be great to get me on the right track.
5.counting time
Hi,
I have a table with 3 "time" fields:
1 starttime
1 stoptime
1 "worked time"
I created a querry to calculate the "worked time" (simple:
stoptime-starttime)
Finally I have to sum all "worked time"s together
I do this with following SQL:
sql = "SELECT Sum(Uren.gewerkt) AS SomVanUur FROM Uren WHERE
Uren.Datum > #" & Format(Forms![Uur_overzicht]!Start_dat, "DD/MM/YYYY")
& "# And Uren.Datum < #" & Format(Forms![Uur_overzicht]!Stop_dat,
"DD/MM/YYYY") & "# ;"
Set kost = db.OpenRecordset(sql)
Then I enter the value in an entryfield:
Me!rek = Format(kost!somvanUur, "hh:mm")
the somvanUur is 1,229166
Me!rek shows 05:30 while it should be 28:30
What am I doing wrong?
Thanks
JP
6. Counting num chars in real time
7. count number of times a form is displayed
8. real time character count