Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-06-05 : 21:38:16
|
Jonathan Fletcher writes "Dear SQLTEAM,
I'm producing a timsheet app at work using SQL 2000 and ASP.
I'm really stuck on one sproc though.
I want to produce a list of all users in a team that have not filled out their timesheets since their start date at the company. I want the results to display their name, id, team name, and the dates that they have not completed their timesheets.
Essentially the tables are like this:
Users ----- UID UserName TeamID StartDate
Teams ----- TeamID TeamName
HoursWorked ----------- UID ProjectID HoursWorkedMonday etc WeekEnding (smalldatetime value showing which week they entered this project e.g. this week would be the weekending 10th Jun (Sunday).
So, ideally the resulting table I would get from the query would look like this:
UID UserName TeamName StartDate DateMissing 1 jfletcher Technolgy 01/01/01 10/06/01 1 jfletcher Technolgy 01/01/01 03/06/01 2 Bob Technolgy 14/06/01 04/08/01
I may also need in the future to get all missing timesheets in the company rather than just by team (2 seperate queries)!
Any help would be greatly appreciated! I'm really stuck on this one!!
Many Thanks
Jonathan Fletcher jfletcher@antfactory.com" |
|
|
|
|
|