In sql join on date or other query we fall common problem of time span. we can easily remove that to convert the date in to var-char & date format code 106 in sql.
LEFT JOIN Payroll_tblEmployeeLeave ON PIS.dbo.PIS_tblEmployeeGenInfo.GEmployeeGenInfoID=Payroll_tblEmployeeLeave.GEmployeeGenInfoID
and Convert(varchar(11) ,Payroll_tblEmployeeLeave.LeaveDate,106 )=''' + Convert(varchar(11),@OfficeLeaveDate,106 ) + '''
Comments
Post a Comment