Click here to Skip to main content
15,893,814 members
Home / Discussions / Database
   

Database

 
AnswerRe: Multiple select in 1 query Pin
N a v a n e e t h15-Sep-08 21:55
N a v a n e e t h15-Sep-08 21:55 
QuestionRemoving spaces using query Pin
M Riaz Bashir15-Sep-08 19:24
M Riaz Bashir15-Sep-08 19:24 
AnswerRe: Removing spaces using query Pin
Ashfield15-Sep-08 20:12
Ashfield15-Sep-08 20:12 
Questionhelp! Spliting Time spent on business hours and after hours Pin
CandyHe15-Sep-08 12:11
CandyHe15-Sep-08 12:11 
AnswerRe: help! Spliting Time spent on business hours and after hours Pin
Blue_Boy15-Sep-08 12:38
Blue_Boy15-Sep-08 12:38 
GeneralRe: help! Spliting Time spent on business hours and after hours [modified] Pin
CandyHe15-Sep-08 13:26
CandyHe15-Sep-08 13:26 
GeneralRe: help! Spliting Time spent on business hours and after hours Pin
Blue_Boy15-Sep-08 16:37
Blue_Boy15-Sep-08 16:37 
AnswerA different approach to storing time Pin
David Mujica16-Sep-08 5:36
David Mujica16-Sep-08 5:36 
You may want to consider storing your data differently so that it is easier and more flexible to manipulate.

For example, consider the following:

Start_Time End_Time Type Pay_Code
06:00 8:00 WORK OT1
8:00 10:00 WORK REG
10:00 10:05 BREAK UNPAID
10:05 12:00 WORK REG
12:00 13:00 BREAK UNPAID
13:00 17:00 WORK REG
17:00 19:00 WORK OT1

Start_Time End_Time Type Pay_Code
08:00 16:00 HOLIDAY REG

This type of structure allows you to identify parts of a day and classify them appropriately. You can say that time worked before the scheduled work day is paid at overtime. You could identify a break in the middle of the day as unpaid. (Same is true for lunch) You could also then show the time after the normal work day to be at overtime. This example assumes that you are using a pay schedule where time over 8 hours in a day is paid at overtime. In the USA, most overtime is paid only after 40 hours of work.

The second example shows how you represent Holiday pay. This schema also allows for sick time (paid or unpaid).

I'll leave it up to the class to show how you can expand this data structure to include charge codes where you could identify which cost centers the labor should be applied to. Wink | ;)
GeneralRe: A different approach to storing time Pin
David Mujica16-Sep-08 5:55
David Mujica16-Sep-08 5:55 
QuestionChecking if a field exists in a table before adding it to another table Pin
Twyce15-Sep-08 10:38
Twyce15-Sep-08 10:38 
AnswerSounds like homework, but ... Pin
David Mujica15-Sep-08 10:57
David Mujica15-Sep-08 10:57 
AnswerRe: Checking if a field exists in a table before adding it to another table Pin
Blue_Boy15-Sep-08 11:31
Blue_Boy15-Sep-08 11:31 
AnswerRe: Checking if a field exists in a table before adding it to another table Pin
Pete O'Hanlon15-Sep-08 11:46
mvePete O'Hanlon15-Sep-08 11:46 
Questionanyone can give me sample syntax or code in update using mysql in c#?? Pin
cutedrew15-Sep-08 8:02
cutedrew15-Sep-08 8:02 
AnswerRe: anyone can give me sample syntax or code in update using mysql in c#?? Pin
Blue_Boy15-Sep-08 8:43
Blue_Boy15-Sep-08 8:43 
Questionrun SQL server scripts from inside a C# code Pin
Sabry190515-Sep-08 1:17
Sabry190515-Sep-08 1:17 
AnswerRe: run SQL server scripts from inside a C# code Pin
Ashfield15-Sep-08 1:21
Ashfield15-Sep-08 1:21 
GeneralCombining Like and In Pin
Brady Kelly15-Sep-08 0:49
Brady Kelly15-Sep-08 0:49 
GeneralRe: Combining Like and In Pin
Blue_Boy15-Sep-08 0:54
Blue_Boy15-Sep-08 0:54 
Questionmax date without repeat in query Pin
mahmoudinirat15-Sep-08 0:26
mahmoudinirat15-Sep-08 0:26 
AnswerRe: max date without repeat in query Pin
Blue_Boy15-Sep-08 0:41
Blue_Boy15-Sep-08 0:41 
AnswerRe: max date without repeat in query Pin
Ashfield15-Sep-08 1:15
Ashfield15-Sep-08 1:15 
Questioninline table function Pin
bdl15-Sep-08 0:22
bdl15-Sep-08 0:22 
AnswerRe: inline table function Pin
nelsonpaixao21-Sep-08 15:21
nelsonpaixao21-Sep-08 15:21 
Questioncopy data from three different tables to one table Pin
justintimberlake15-Sep-08 0:14
justintimberlake15-Sep-08 0:14 

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.