Subject Trailing spaces behaviour
Author Alexander Tabakov
Hi All,

I have found strange behaviour concerning trailing spaces - following strings are equal:

'ABC   ' = 'ABC'

You can try the following query:

  case when 'ABC   ' = 'ABC' then 1 else 0 end,
  case when cast('ABC   ' as varchar(10)) = cast('ABC' as varchar(10)) then 1 else 0 end,
  char_length('ABC   '),

This query was tested on FB v.1.5.6, 2.5.8 & 3.0.3 - while char length (or strlen on 1.5) is different, the strings are always equal.

Is this by design :)

WBR, Alex