Hi all
I am currently using DATEPART to return a list of birthdays for a particular month in a stored procedure. The SP accepts a parameter @Month INT - and the DATEPART query is as follows:
WHERE DATEPART(MONTH, Employee) = @Month.
Apparently, DATEPART is quite an intensive query - and I need to optimise this query as much as possible. Does anyone have any suggestions for me on how to do this? Someone has suggested to me that a BETWEEN clause should be used instead of DATEPART - but I can't see how this could work for a list of birthdays for a particular month.
Thanks as always
Craftor

I am currently using DATEPART to return a list of birthdays for a particular month in a stored procedure. The SP accepts a parameter @Month INT - and the DATEPART query is as follows:
WHERE DATEPART(MONTH, Employee) = @Month.
Apparently, DATEPART is quite an intensive query - and I need to optimise this query as much as possible. Does anyone have any suggestions for me on how to do this? Someone has suggested to me that a BETWEEN clause should be used instead of DATEPART - but I can't see how this could work for a list of birthdays for a particular month.
Thanks as always
Craftor