When I am reviewing code of a stored procedure I find some interesting facts.
The developer sends the date parameter as a string and then converts the date columns of the table to string to compare value.
WHEN CONVERT(VARCHAR, examdate, 105) = CONVERT(VARCHAR, @P_Examdt, 105);
@P_Examdt – The parameters of stored procedure
1. I don't understand why?
2. Is it decreasing the performance of the query?
If anyone have any comments please suggest.
Posted by: MR. JOYDEEP DAS