hi please help.how write the query abs((attendmatch.timediff)-(employee.Workhours)and <>(employee.category='Restday') AS Diffhours
i want to get the Diffhours result abs((attendmatch.timediff)-(employee.Workhours)) AS Diffhours ,if overtime.categoryday =restday then diffours is =timediff ,if overtime.category is not = restday then Diffhours
this is current code:
thanks for help.Code:SELECT DISTINCT attendmatch.employeeno, attendmatch.overtimedate, employee.Workhours, attendmatch.timediff, abs((attendmatch.timediff)-(employee.Workhours)and <>(employee.category='Restday') AS Diffhours, overtime.othours,overtime.categoryday,overtime.department FROM attendmatch, employee, overtime WHERE attendmatch.employeeno=employee.employeeno and attendmatch.employeeno=overtime.employeeno and attendmatch.overtimedate=overtime.overtimedate GROUP BY attendmatch.employeeno, employee.employeeno, attendmatch.overtimedate, employee.Workhours, attendmatch.timediff, overtime.othours, overtime.categoryday, overtime.department




Reply With Quote