Reputation: 60691
I am trying to count all the rows in the month of December:
select COUNT(*) from quicklabdumpgood
where [Date Entered]>'20111131'
and [Date Entered]<'20120101'
but my problem is that:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
It looks like some of the [date entered]
fields are empty. How do I NOT count them if they are empty?
Please note that [date entered]
is DATE
not DATETIME
Upvotes: 1
Views: 182