I'd like to pull out records where the day of the week is Friday or Saturday. So I have the following query:
SELECT aId, aStatus
WHERE DATEPART(weekday,aDate) = 5 OR DATEPART(weekday,aDate) = 6
I get an error message thus:
Microsoft OLE DB Provider for SQL Server error '80040e14'
An expression of non-boolean type specified in a context where a condition is expected
Is it possible to use Datepart in this way, and if so, how can I fix this query? If not, what is the best way to achieve the same result?