Note that trailing spaces are not removed when you insert data into a TEXT
(or BLOB for that matter) column.  This may be of use to you, but TEXT does
have limitations.

Andy

> -----Original Message-----
> From: Egor Egorov [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2003 09:31
> To: [EMAIL PROTECTED]
> Subject: Re: concat() differences between mssql and mysql
>
>
> "Ooks Server" <[EMAIL PROTECTED]> wrote:
> > I've run into a problem with the behavior of concat(). If I
> have two fields,
> > char(10), and I do this:
> >
> > concat(field1,fields)
> >
> > With MSSQL I get both fields including trailing spaces. With
> MYSql, I get
> > the two fields with the trailing spaces trimmed. Example:
> >
> > Field1 = "abc       "
> > Field2 = "qwerty    "
> >
> > MSSQL -> concat( field1, fields) -> "abc       qwerty    "
> > MYSQL -> concat( field1, fields) -> "abcqwerty"
> >
> > How do I get Mysql to behave like MSSQL does? I need it to
> concatenate the
> > fields without stripping the trailing spaces.
>
> It's a known behaviour of MySQL. MySQL removes trailing spaces at
> the end of VARCHAR and CHAR columns:
>       http://www.mysql.com/doc/en/Open_bugs.html
>
>
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Egor Egorov
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
>        <___/   www.mysql.com
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to