Click here to Skip to main content
16,020,628 members
Home / Discussions / Database
   

Database

 
GeneralRe: sql script Pin
J4amieC27-Sep-12 1:06
J4amieC27-Sep-12 1:06 
QuestionLine line is a select statement. Pin
vanikanc26-Sep-12 8:22
vanikanc26-Sep-12 8:22 
AnswerRe: Line line is a select statement. Pin
jschell26-Sep-12 8:37
jschell26-Sep-12 8:37 
GeneralRe: Line line is a select statement. Pin
vanikanc26-Sep-12 8:39
vanikanc26-Sep-12 8:39 
GeneralRe: Line line is a select statement. Pin
jschell27-Sep-12 9:57
jschell27-Sep-12 9:57 
AnswerRe: Line line is a select statement. Pin
Niju126-Sep-12 22:28
Niju126-Sep-12 22:28 
AnswerRe: Line line is a select statement. Pin
Ingo26-Sep-12 23:04
Ingo26-Sep-12 23:04 
QuestionAttendance and leave of employees Pin
Amr Muhammed25-Sep-12 13:06
Amr Muhammed25-Sep-12 13:06 
Greetings,

I have 3 tables respectively called "Employee_Personal_Info", "Employee_Job_Info" and "Attend_and_Leave_Of_Staff". The Last table contains a log from the fingerprint device and its columns are [Record Number], [Machine ID], [Employee ID], [In/Out Mode] which contains only 0 for attend and 1 for leave, [Verify Mode] which contains only 1 for fingerprint and 15 for face, [Date] and [Time]

Columns concern me here within those tables are
1- Employee_Personal_Info: [Employee ID], [First Name], [Middle Name], [Last Name] and [Family Name]
2- Employee_Job_Info: [Job title], [Shift ID]
3- Attend_And_Leave_Of_Staff: [Date], [Time]

We have 2 work shifts one that starts and ends in the same date begin at 8:00 AM and ends at 4:00 PM and the other begin at 6:30 PM and ends on the next day at 8:00 AM.

I need to create a SQL query that returns me all employees registered on a specific work shift with their attend and leave time. That is it when selecting a specific type of shift the query returns me all the employees registered in such shift and beside each one his attend/leave date/time and returns null if one of the date/time is not found and null for both if there is no attendance data for him. I know it may be a complex query specially when dealing with employees registered in the second shift that starts at a day and ends on another one. I will be grateful for any ideas or any help
AnswerRe: Attendance and leave of employees Pin
Ingo25-Sep-12 20:50
Ingo25-Sep-12 20:50 
GeneralRe: Attendance and leave of employees Pin
Andrei Straut25-Sep-12 21:03
Andrei Straut25-Sep-12 21:03 
GeneralRe: Attendance and leave of employees Pin
Ingo25-Sep-12 21:19
Ingo25-Sep-12 21:19 
GeneralRe: Attendance and leave of employees Pin
Andrei Straut25-Sep-12 21:20
Andrei Straut25-Sep-12 21:20 
QuestionConvert datetime to certain format Pin
vanikanc25-Sep-12 9:09
vanikanc25-Sep-12 9:09 
AnswerRe: Convert datetime to certain format Pin
Ingo25-Sep-12 20:58
Ingo25-Sep-12 20:58 
QuestionSql server topics and materials Pin
Azizullahazizi24-Sep-12 18:32
Azizullahazizi24-Sep-12 18:32 
AnswerRe: Sql server topics and materials Pin
Andrei Straut24-Sep-12 20:12
Andrei Straut24-Sep-12 20:12 
AnswerRe: Sql server topics and materials Pin
Sandeep Mewara24-Sep-12 20:23
mveSandeep Mewara24-Sep-12 20:23 
QuestionSQL Search within a table Pin
veon cheng24-Sep-12 9:31
veon cheng24-Sep-12 9:31 
AnswerRe: SQL Search within a table Pin
Corporal Agarn25-Sep-12 1:08
professionalCorporal Agarn25-Sep-12 1:08 
GeneralRe: SQL Search within a table Pin
veon cheng25-Sep-12 3:37
veon cheng25-Sep-12 3:37 
AnswerRe: SQL Search within a table Pin
Ingo25-Sep-12 4:13
Ingo25-Sep-12 4:13 
QuestionCONNECTING MSSQL DB FILE FROM PEN DRIVE Pin
r_mohd22-Sep-12 22:38
r_mohd22-Sep-12 22:38 
AnswerRe: CONNECTING MSSQL DB FILE FROM PEN DRIVE Pin
Eddy Vluggen23-Sep-12 2:38
professionalEddy Vluggen23-Sep-12 2:38 
AnswerRe: CONNECTING MSSQL DB FILE FROM PEN DRIVE Pin
jschell23-Sep-12 8:10
jschell23-Sep-12 8:10 
GeneralRe: CONNECTING MSSQL DB FILE FROM PEN DRIVE Pin
r_mohd24-Sep-12 2:28
r_mohd24-Sep-12 2:28 

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.