Is there any way for me to test a data conversion in a select statement and only return rows where the conversion fails?
IE:
SELECT * FROM my_table WHERE CONVERT(datetime, [colA]) = NULL
I'm open to any SQL hacks/trickery.
Is there any way for me to test a data conversion in a select statement and only return rows where the conversion fails?
IE:
SELECT * FROM my_table WHERE CONVERT(datetime, [colA]) = NULL
I'm open to any SQL hacks/trickery.
Use isdate
SELECT * FROM my_table
WHERE isdate(colA) = 0
See also Trouble With ISDATE And Converting To SMALLDATETIME