Subject Re: How to create a string column with significant trailing spaces
Author davidrevill69
I have been using FireBird and Interbase for years and never realised
that it ignores the training spaces on an equality condition.

I have always trimmed varchars because I assumed it would behave in
the way you want it work.

I do not know how to get it to behave the way you want, but am
curious as to why you want to include significant trailing spaces in
your data when they are so difficult to see

--- In, Thekla Damaschke
<thekla.damaschke@...> wrote:
> There is a difference in behaviour between firebird and most other
> regarding string columns.
> It seems like firebird ALWAYS ignores trailing spaces in string
> when matching,
> while other vendors distinguish between CHAR and VARCHAR fields
> where VARCHAR fields are not padded automatically.
> I have a usecase where I would like to declare a database column
> padding,
> i.e. the selections "WHERE col = 'xyz' " does NOT deliver rows with
> = 'xyz ',
> while otherwise preserving the normal collation properties , like
> sorting order and similar.
> Is there a way to achieve this inside the database server without an
> application level tricks ?
> Thanks for any hints.
> /Thekla Damaschke