Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Join with now row in detail table

Author  Topic 

Rashednadeem
Starting Member

5 Posts

Posted - 2014-06-12 : 05:39:02
Hi
I have 3 tables
Employees
{
EmployeeID
EmployeeName
}
AttSattus
{
StatusID
StatusName
}
AttendanceRecords
{
RecordID
Date
TimeIn
TimeOut
StatusCode
}

I need a procedure to to Select records for whole month i. e for 31 days if record for an employee is not in db then he/she must be with Absent status final output should look like this:
Date, Employee Name, Time In, Time Out, Status

currently i am using temp tables that have performance issues very slow
Please guide

Thanks in Advance
Rashed


Rashed

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2014-06-12 : 07:50:49
Can you show use what you are doing?

djj
Go to Top of Page

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-06-12 : 07:57:33
there is no relationship between the tables..how will you know if the employee is present or absent??

Javeed Ahmed
Go to Top of Page
   

- Advertisement -