Hi,
here is as example of the data I'm working with..
AdminDB.Roster
Date Name
03/10/2010 Bob
03/10/2010 Bob
03/10/2010 Dan
03/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
05/10/2010 Bob
05/10/2010 Bob
05/10/2010 Dan
05/10/2010 Dan
Basically there are numerous entries per day which represent shifts and who worked those shifts.
What I want to do is know any day where only one person worked ALL shifts, keeping in mind there could be between 3 and 10 entries of '04/10/2010- Bob' (E.g)
E.g. Count the rows for distinct date; count the rows for distinct date AND name; show me the date where both counts are the same result.
So the result should be '04/10/2010' because only one person worked the total amount of shifts that day.
Does this make sense? can anyone please help?
ALSO. 'date' and 'name' are seperate fields. And I only want to know the date if it was 'Bob' who worked all shifts.
THANK YOU
here is as example of the data I'm working with..
AdminDB.Roster
Date Name
03/10/2010 Bob
03/10/2010 Bob
03/10/2010 Dan
03/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
04/10/2010 Bob
05/10/2010 Bob
05/10/2010 Bob
05/10/2010 Dan
05/10/2010 Dan
Basically there are numerous entries per day which represent shifts and who worked those shifts.
What I want to do is know any day where only one person worked ALL shifts, keeping in mind there could be between 3 and 10 entries of '04/10/2010- Bob' (E.g)
E.g. Count the rows for distinct date; count the rows for distinct date AND name; show me the date where both counts are the same result.
So the result should be '04/10/2010' because only one person worked the total amount of shifts that day.
Does this make sense? can anyone please help?
ALSO. 'date' and 'name' are seperate fields. And I only want to know the date if it was 'Bob' who worked all shifts.
THANK YOU
Comment