>Hi Jim,
>
>>You are absolutely correct. Somewhere here recently I posted an example of where they are not the same.
>
>The main difference is that == compares ANSI codes, while = compares characters. Both are the same, if SET COLLATE is "MACHINE" and no codepage conversion jumps in. But otherwise, you will get really different results.
>
>BTW, I suspect this difference to be the reason why == is faster than =. The second has to convert the string into logical characters before comparing them.
>
Christof,
Actually SET EXACT ON and = pads the shorter string with spaces before comparing and == comapres the strings normally and then checks to see if they are the same length. If the only difference between two strings is trailing spaces then Exact=ON and = will show them as equal while == will show them as not equal.