Subject Re: [firebird-support] Select on varchar with spaces
Author Daniel Rail
Hi,

At June 27, 2005, 18:33, Ann W. Harrison wrote:

> Daniel Rail wrote:
>>
>>
>> SQL Standard, for quite a number of years(maybe over 10-15 years). The
>> trailing blanks in a VARCHAR are stripped when using the "="
>> comparison.
>>
> Actually, that's not quite correct. The SQL Standard states that
> equality operations between strings (either CHAR or VARCHAR) ignore
> trailing blanks.

> Thus a CHAR(1) 'A' = CHAR(3) 'A ' = VARCHAR (54) 'A'

> has nothing to do with variability. And has been that way since 1989.
> Also since then, LIKE behaves differently.


Thanks for the clarification. I should dig deeper in the standard(or
my brain) the next time.

--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)