Hello.


Use TEXT or BLOB columns.







"AESYS S.p.A. [Enzo Arlati]" <[EMAIL PROTECTED]> wrote:

> 

> I got this problem:

> I need to save in a varchar field a string wich can have the ended part

> filled with blank character, and I need to restore the string in the same

> way it was saved, ie. with the right number of ended blank characters.

> Mysql truncate tha last blank characaters of a field

> 

> for example if I have a table like the one belowe and insert some field with

> blank characters at the end , like "abc " or "  middle  ", when I read thei

> field I get "abc" and "  middle".

> 

> create table pippo ( codice int, messaggio varchar(20), a char(20));

> 

> insert into pippo values( 1, "abc ", "123 " );

> insert into pippo values( 2, "  middle  ", " MIDDLE " );

> select codice, messaggio, length(messaggio), a, length(a) from pippo;

> 1          abc                 3         123                 3

> 2            middle            8          MIDDLE             7

> 

> 

> There are some way to avoid the automatic deletion of the last blank

> characters ?

> 

> Regards,

> Enzo Arlati   [EMAIL PROTECTED]

> AESYS Via Artigiani, 41  24060 Brusaporto (BG) - Italy

> Tel. +39 (0)35.2924.182   Fax +39 (0)35 680030

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [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]

Reply via email to