Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Conversion failed when converting date and/or time from character string.

$
0
0
Hi, I am facing an issue as described below.select * from dbo.xyzwhere a in ('a string of multiple values')and <some condition>and cast(a as datetime)=cast(b as datetime)a is varchar(50), and allowed nullsb is varchar(50), and allowed nullsI am getting the following errorMsg 241, Level 16, State 1, Line 1Conversion failed when converting date and/or time from character string.Now, however, if I a run with the characters in the IN clause using individual select statements I don't get an error.Regards,KJ

Viewing all articles
Browse latest Browse all 3145

Trending Articles