i am trying to find the some bad data which is not properly formatted for date columns
the column is Varchar(8) and has value like '06011984'. i know how to convert it into a datetime but there are some bad dates in there. how do i find the bad dates
i.e.: bad date '04100213' instead of '04102013'
i would use
i am using a query like this but it lists me all the records in the table, even the good ones
select * from table where date not like '[0-1][0-9][0-3][0-9][19-20][0-1][0-9]'