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 - 2004-04-08 : 09:08:10
|
| Doug writes "Hopefully you folks can shed some light on this problem I'm having. BTW, the following article seems to be closest to what I need to do:http://www.sqlteam.com/item.asp?ItemID=12654I need to set up an employee database in SQL Server that, among other things, tracks active date ranges for employees.Forinstance, say the following dates apply to an employee:5/12/01 - hired6/10/01 - terminated7/1/02 - hired (rehired)8/10/03 - transfer9/11/03 - terminated1/1/04 - hired (rehired)For reporting purposes, I need to be able to know that this employee should only be counted in data ranges5/12/01 - 6/10/01 and7/1/02 - 9/11/03 and1/1/04 to the presentI'm having a devil of a time figuring out what the table should look like, and what the query to retrieve the data would be. Could you assist please?The article I list above does this to a degree, but does not compensate for if the employee is still currently an employee.Thank you!" |
|
|
|
|
|