Thanks, that now works as I understand it better.
Its still not what I am looking for though...
My table shows
EngineerID VisitDate
123 10-Jul-06
123 10-Jul-06
123 09Jul-06
123 09Jul-06
123 08Jul-06
1234 10-Jul-06
I want my query to do as follows..
EngineerID DaysWorked
123 3
1234 1
Thanks,
Jez
:
If you used the two queries as I suggested then can you post the SQL to both
of them?
But before you do that, if the date field contain the time, then you need to
remove the time from the date field in the first query
Select Id , DateValue(DateField) As NewFieldName
From TableName
Group By Id , DateValue(DateField)
And then run the second query
--
Good Luck
BS"D
:
Hi, Thanks for getting back to me.
This still doesnt work.
What I am trying to do is..
If I attend a 3 jobs today and 2 Jobs tomorrow, I want to count the number
of days i have worked. so in this case it would be 2 days worked but 5 jobs
completed.
how can i workout how many days worked?
Thanks,
Jez
:
One way will be by creating two queries
1. GroupBy query to group the ID and the Date
Select Id , DateField
From TableName
Group By Id , DateField
2. Another group By query with a count, that based on the above query
Select Id , Count([DateField]) As CountOfDate
From QueryName
Group By Id
--
Good Luck
BS"D
:
Hi,
Please help...
I have a table of data holding Engineers ID's and Visit Dates of when they
attended work jobs. I am wanting to Count the Visit Dates but where he does
multiple visits in 1 day I only want to count it once.
How can I do this in a query?
Thanks,
Jez