anthony.r.colvin (7/28/2015)
I was trying to use a wild card for a date column such as July of 2015 and the query would show me all orders made within the month of July 2015. I have found a work around, so I was just trying to see if anyone knows why the wildcard is not an available option on a datetime column in SQL Server.
You could try something like:
WHERE DATEPART(YEAR, OrderDate) = 2015
AND DATEPART(MONTH, OrderDate) = 7
WHERE DATEPART(YEAR, OrderDate) = 2015
AND DATENAME(MONTH, OrderDate) = 'July'
From a performance point of view, this may not be the best option
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]