Home Forums SQL Server 2008 T-SQL (SS2K8) Trying to understand ISDATE & CAST behavior RE: Trying to understand ISDATE & CAST behavior
Ant-Green
SSC Guru
Points: 113445
More actions
January 17, 2013 at 7:20 am
#1578309
You can't have two different data types in the same column, your effectivly saying I want DATETIME and VARCHAR data in the same column which is not allowed.
You will need to do a double cast
cast(cast(col2 as datetime) as varchar)