>
>You can do that by converting string values to binary
>IF CAST( 'ALLO' AS varbinary(10)) = CAST( 'Allo' AS varbinary(10))
> PRINT '=='
>ELSE
> PRINT '<>'
>>
>Sergey, you provided that answer a few years ago and it helped some one. I was trying to figure out the same thing today, and figured a "Sergey Search" would give me the answer.
>
>You are THE MAN!
>
>Kevin
SORRY,
The conversion to varbinary is wrong.
IF 'ALLO' = 'ALLO '
SELECT 'same'
ELSE
SELECT 'diff'
IF CAST( 'ALLO' AS varbinary(10)) = CAST( 'ALLO ' AS varbinary(10))
SELECT 'same'
ELSE
SELECT 'diff'
use COLLATE
IF 'ALLO' = 'allo ' COLLATE Latin1_General_BIN
SELECT 'same'
ELSE
SELECT 'diff'