Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

string comparison gives different values

$
0
0

Hi,

I have the following query:

select * from table_A

WHERE  CONVERT(VARCHAR(10),DEPARTURE_DATE,110) = '02-28-2014' . This works just fine.

But when I run the query like thiS:

WHERE  CONVERT(VARCHAR(10),FDL.DEPARTURE_DATE,110) between '02-28-2014' AND '03/05/2014'. It gives me values of 2009 year. Can you explain whats the difference here?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>