Case sensativity

  • 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

  • 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

  • Thanks Lynn. You nailed it 100% Nothing like a bit of stupidity on my part.

    Thanks again.

    Paul

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply