How do I select all rows except for ones that where I get an error calling CONVERT
on one of the columns?
For example, I am doing this:
SELECT rowid
FROM batchinfo
WHERE CONVERT(DATE, reporttime, 101) between '2010-07-01' and '2010-07-31';
And I am getting errors for some of the values. I have two questions:
- How can I skip the rows that have errors?
- How can I get only the rows that have errors?