Subject Re: RES: [ib-support] The comparison operator [equal] accepts blank spaces on end of expression?
Author Ann W. Harrison
At 04:10 PM 4/28/2003 -0300, Enio Bueno wrote:
>Hi David
>The FIELDX is varchar(60)
>I try WHERE fieldx = cast('test ' as varchar(60))
>and WHERE CAST(fieldx as varchar(60)) = cast('test ' as varchar(60))
>but don't work, i always receive the row.

The equality operator ignores trailing blanks in all character types.
Use LIKE when trailing blanks are significant.

where fieldx like 'test '

Regards,


Ann