From: Daevid Vincent Date: July 8 2003 8:11pm Subject: RE: concat() differences between mssql and mysql List-Archive: http://lists.mysql.com/mysql/144657 Message-Id: <004801c3458d$2b059fc0$a40aa8c0@gabriel> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hmmm. Well you might be able to work some magic if you know the length = of the field it's supposed to be, then you could subtract the length of the Field and then pad with spaces.=20 If this is to be displayed in a web page, and I assume you're trying to = line things up pretty, just put them in table cells. If it's output to the terminal window, then try using a "\t" character = to tab to the next spot for columnar output. Daevid Vincent http://daevid.com =20 > -----Original Message----- > From: Ooks Server [mailto:OoksServer@stripped]=20 > Sent: Monday, July 07, 2003 4:38 PM > To: mysql@stripped > Subject: concat() differences between mssql and mysql >=20 >=20 > I've run into a problem with the behavior of concat(). If I=20 > have two fields, > char(10), and I do this: >=20 > concat(field1,fields) >=20 > With MSSQL I get both fields including trailing spaces. With=20 > MYSql, I get > the two fields with the trailing spaces trimmed. Example: >=20 > Field1 =3D "abc " > Field2 =3D "qwerty " >=20 > MSSQL -> concat( field1, fields) -> "abc qwerty " > MYSQL -> concat( field1, fields) -> "abcqwerty" >=20 > How do I get Mysql to behave like MSSQL does? I need it to=20 > concatenate the > fields without stripping the trailing spaces. >=20 >=20 > --=20 > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: =20 > http://lists.mysql.com/mysql?> unsub=3Ddaevid@stripped >=20