How to add in other whenever came from Public holiday date
newholiday is my table name where all the Public Holiday in my table so i want to know
when ever employee came office of holiday date the and do intime in holiday date then
1 day add in other
employee details is my table where is in this table intime
i have a code give below -
IF(@qtype = 1)
BEGIN
SELECT [EmployeeId]
,[CL] as CasualLeave
,[EL] as EarnedLeave
,[ML] as MedicalLeave
,isnull( (select COUNT (e.in_time) as c from Employee_detail e join
newholiday N on convert( date ,day)=convert(date ,e.in_time )
--where e.name=@EmpID),0) as Other
,[OthersLeave] as Other
,[TotalLeave]
,[totalGranted] as totalgranted
FROM tran_emp_office_details
WHERE [EmployeeId] = @EmpID
END