|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: |
select convert(varchar(10), TS_Day,101) as Date, EmployeeID, Name,
convert(varchar,datediff(hh,0,(dateadd(ss,sum(ts_seconds) ,0))))+
substring((convert(varchar(8),(dateadd(ss,sum(ts_seconds) ,0)),114)),3,3) as HrsMin
from
(
SELECT TS_day, L.EmployeeId, L.LastName + ', ' + L.FirstName AS Name, Sum(TS_Seconds) as ts_Seconds
FROM
(
select company,employeeid,
convert(datetime,convert(varchar(8),[timeOut],112)) as TS_Day,
timein, [timeout], BreakFlag,
IsNull ( ( select top 1 case when t1.Breakflag = 1 then datediff(ss,t1.timeout, t2.Timein) else 0 end
from EmployeeHours t2
where t2.employeeid = t1.employeeid
and t2.company=t1.company
and convert(varchar(8),t2.timein) = convert(varchar(8),t1.timein) -- must be same day
order by t2.timein asc, t2.timeout asc, recordid asc),0) as ts_seconds
from EmployeeHours t1
) times
INNER JOIN EmployeeCustomFieldsData C ON (times.EmployeeId = C.EmployeeId) AND (times.Company = C.Company)
INNER JOIN EmployeeList L ON (C.EmployeeId = L.EmployeeId) AND (C.Company = L.Company)
LEFT JOIN UserList U ON L.ManagerUID = U.UID and L.Company = U.Company
WHERE convert(datetime,convert(char(8),times.TimeIn,112)) between @From and @To
AND L.Suspend = 0
AND C.CustomFieldData in ('DH', 'CL', 'EX')
AND times.Company=1
GROUP BY times.employeeid, L.EmployeeId, L.LastName + ', ' + L.FirstName,ts_Day
) daily
GROUP BY employeeid, name, ts_Day
HAVING (sum(ts_Seconds) / 60) >16
ORDER BY name, employeeid, ts_Day
|
Advertisement
| Hall of Fame |