SQL timetable for employee

Posted by latinunit-net on Stack Overflow See other posts from Stack Overflow or by latinunit-net
Published on 2010-04-25T15:33:35Z Indexed on 2010/04/25 15:43 UTC
Read the original article Hit count: 224

Filed under:
|
|

Hi guys,

i need to create an employee shift database. so i have 3 tables so far, employee, employee_shift, and shift

im suppose to calculate how many shifts an employee has done at the end of the month, my question means, because a month has 30 days some have 28 and 31 days.

this means i need to create in the shift table 31 different variations? one for each day of the month? in order to calculate which employee has worked the most?

in my business relation it says an employee has either 1 or 2 shifts per day therefore do i have to have 60 different rows of variations? im i right or is there an easy way to work it out

© Stack Overflow or respective owner

Related posts about sql

Related posts about shift