Subject Re: white character variable
Author Adam
--- In firebird-support@yahoogroups.com,
"mariohoule2005" <mariohoule2005@...> wrote:
>
> Hi, i have a problem to generate variable containing white
character
> string. Ex if my variable P_SIZE has 8 for value, i need to have in
the
> V_ZONE variable ' ' but now i receive '' . What i do wrong
or
> how can i solve my problem?

The boffins behind the SQL standard decided that a char field would
be padded with spaces up until its defined length, and a varchar
field would have any trailing spaces removed. Firebird simply adheres
to the SQL standard.

If there is the *need* to store the number of trailing spaces, you
may need a second smallint field to store trailing spaces and
concatenate in your data access layer. As stupid as I think the
standard is at this point, I have never really come across the need
to store trailing spaces in a varchar field. Perhaps you can
elaborate what you are trying to do?

Adam