Click here to Skip to main content
15,911,141 members
Home / Discussions / Database
   

Database

 
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 
AnswerRe: Attendance and leave of employees Pin
Ingo25-Sep-12 20:50
Ingo25-Sep-12 20:50 
I don't know if I understand what output you wanted, but I tried Smile | :)

I pretend that the ist the EmployeeID in every table, otherwise you can't join data (and you can't know who belongs to the data). There are other columns missing, too. Look at Attend_And_Leave_Of_Staff - where do you know, to which shiftId the date and time belongs? Just a date and a time column doesn't make sense to me.

SELECT a.FirstName, a.FamilyName, b.JobTitle, c.???
FROM Employee_Personal_Info a INNER JOIN Employee_Job_Info b ON a.EmployeeID = b.EmployeeID
LEFT JOIN Attend_And_Leave_Of_Staff c ON a.EmployeeID = c.EmployeeID AND b.ShiftId = c.ShiftId
WHERE b.ShiftId = @shiftIdToLookUp


I can't go further because of missing data, but that

I changed the second join to LEFT JOIN thanks to Andrei Straut.
------------------------------
Author of Primary ROleplaying SysTem

How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.


modified 26-Sep-12 3:18am.

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 
GeneralRe: CONNECTING MSSQL DB FILE FROM PEN DRIVE Pin
jschell24-Sep-12 12:37
jschell24-Sep-12 12:37 

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.