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:
You can use the ISDATE() function to test the values.
SELECT *
FROM MyTable
WHERE ISDATE(MyColumn) != 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With