Click here to Skip to main content
15,908,906 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL SERVER TRIGGERS Pin
εїзεїзεїз30-Sep-09 23:26
εїзεїзεїз30-Sep-09 23:26 
AnswerRe: SQL SERVER TRIGGERS Pin
Md. Marufuzzaman1-Oct-09 7:11
professionalMd. Marufuzzaman1-Oct-09 7:11 
Questionemployee timecard Pin
uglyeyes30-Sep-09 14:27
uglyeyes30-Sep-09 14:27 
AnswerRe: employee timecard Pin
leckey30-Sep-09 16:07
leckey30-Sep-09 16:07 
AnswerRe: employee timecard Pin
dan!sh 30-Sep-09 16:27
professional dan!sh 30-Sep-09 16:27 
AnswerRe: employee timecard Pin
εїзεїзεїз30-Sep-09 21:32
εїзεїзεїз30-Sep-09 21:32 
AnswerRe: employee timecard Pin
Sujit Mandal30-Sep-09 23:08
Sujit Mandal30-Sep-09 23:08 
GeneralRe: employee timecard Pin
uglyeyes1-Oct-09 13:41
uglyeyes1-Oct-09 13:41 
Hi Guys,

thanks for your response. I should have been more specific. I have already created few tables which are as below.
Employee, EmployeeType, Jobtitle,
Period (PeriodId PeriodStartDate PeriodEndDate),
timeCard(TimeCardId,PeriodId,EmployeeId,Date,StartTimeAM,EndTimeAM,StartTimePM,EndTimePM,BreakTaken,UpdatedDate,IsApproved)

period
17 2009-09-21 00:00:00 2009-09-27 00:00:00
timecard for one week for one employee
1 17 1 2009-09-21 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0
2 17 1 2009-09-22 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0
3 17 1 2009-09-23 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0
4 17 1 2009-09-24 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0
5 17 1 2009-09-25 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0
6 17 1 2009-09-26 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0
7 17 1 2009-09-27 00:00:00 1900-01-01 06:15:00 1900-01-01 11:30:00 1900-01-01 17:15:00 1900-01-01 12:00:00 1900-01-01 01:00:00 2009-10-01 11:38:00 0

for you to understand I have provided columns of period and timecard. this web application is used by hospitality industry.
employee works shifts like 7am-12pm and 6pm-2am
Now, I am thinking I shouldnt store computed values.
My problem is how do i work it out below:

If they work after mid-night they should get penalty and those two hours after midnight should be moved to record

also I dont know how to calculate their pay.

could you please help?
GeneralRe: employee timecard [modified] Pin
uglyeyes5-Oct-09 13:58
uglyeyes5-Oct-09 13:58 
GeneralTrack work extents Pin
David Mujica7-Oct-09 3:28
David Mujica7-Oct-09 3:28 
GeneralRe: Track work extents Pin
uglyeyes15-Oct-09 13:10
uglyeyes15-Oct-09 13:10 
GeneralRe: Track work extents Pin
David Mujica16-Oct-09 10:03
David Mujica16-Oct-09 10:03 
QuestionOpenrowset across a network Pin
Mustafa Ismail Mustafa30-Sep-09 2:13
Mustafa Ismail Mustafa30-Sep-09 2:13 
AnswerRe: Openrowset across a network Pin
Henry Minute30-Sep-09 3:14
Henry Minute30-Sep-09 3:14 
GeneralRe: Openrowset across a network Pin
Sujit Mandal30-Sep-09 23:09
Sujit Mandal30-Sep-09 23:09 
AnswerRe: Openrowset across a network Pin
Md. Marufuzzaman1-Oct-09 7:14
professionalMd. Marufuzzaman1-Oct-09 7:14 
QuestionTable Structure for Product -> Book Pin
Brendan Vogt29-Sep-09 23:39
Brendan Vogt29-Sep-09 23:39 
AnswerRe: Table Structure for Product -> Book Pin
Mycroft Holmes30-Sep-09 0:34
professionalMycroft Holmes30-Sep-09 0:34 
QuestionRe: Table Structure for Product -> Book Pin
Brendan Vogt30-Sep-09 2:43
Brendan Vogt30-Sep-09 2:43 
AnswerRe: Table Structure for Product -> Book [modified] Pin
Andy_L_J30-Sep-09 21:29
Andy_L_J30-Sep-09 21:29 
QuestionRe: Table Structure for Product -> Book Pin
Brendan Vogt30-Sep-09 22:55
Brendan Vogt30-Sep-09 22:55 
AnswerRe: Table Structure for Product -> Book [modified] Pin
Andy_L_J1-Oct-09 0:18
Andy_L_J1-Oct-09 0:18 
Questionpivot error Pin
snouto29-Sep-09 21:28
snouto29-Sep-09 21:28 
AnswerRe: pivot error Pin
Mycroft Holmes30-Sep-09 0:42
professionalMycroft Holmes30-Sep-09 0:42 
AnswerRe: pivot error Pin
Syed Mehroz Alam30-Sep-09 0:50
Syed Mehroz Alam30-Sep-09 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.