paulr-605880
SSC Enthusiast
Points: 143
More actions
December 18, 2008 at 12:00 pm
#383606
Can someone tell me why this evaluates to 'True'?
SELECT CASE WHEN 'dd' = 'DD' THEN 'True' ELSE 'False'
Is there some way I can get it to evaluate 'False' on a statement by statement basis?
Thanks in advance,
Paul
Lynn Pettis
SSC Guru
Points: 442467
December 18, 2008 at 12:21 pm
#914817
Your database and/or server is using a case-insensitive collation, therefore 'dd' = 'DD' is true. You could do something like this:
'dd' collate Latin1_General_BIN2 = 'DD' collate Latin1_General_BIN2
December 18, 2008 at 5:09 pm
#914927
Thanks Lynn. You nailed it 100% Nothing like a bit of stupidity on my part.
Thanks again.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply