Hi all,
I have a simple question with the following query
select distinct convert(varchar,MovementInformation.MovementDateTime,101),Employee.EmployeeName
from
MovementInformation
inner
JOIN Employee ON (MovementInformation.EmployeeId = Employee.Id)
where
Employee.Id in(select * from GetAbsentEmployees('8/1/2008 0:00:00 AM','8/30/2008 11:59:59 PM'))
and
MovementInformation.MovementDateTime
not
in(select * from GetDateRange('8/1/2008 0:00:00 AM','8/30/2008 11:59:59 PM'))
I want to get the absentee records from the above mentioned query. the Get AbsenteeEmployees is a table value function which returns the absent employee IDs.The Get DataRange is also a table valued function which returns all the dates for a given period.eg:- 8/1/2008,8/2/2008
My problem is i get records but the dates are wrong.The movement information table does not have records if the employee is absent.
I think there is some wrong with the query.
Can u plz correct it and send it to me.I am stuck with it.
Thanks
Lucki