sql datetime in join condition

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 ) + '''  

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

mvc razor textboxfor change event change another textboxfor value

ASP.NET MVC razor SAP Crystal report