Error Code: 1265. Data truncated for column 'Record_id' at row 1 0.109 sec

2

I have the "registry" table defined in this way in my database:

create table registro( 
    Id_registro int not null auto_increment, 
    fecha date, 
    financiero int not null, 
    clientes int not null, 
    procesos_internos int not null, 
    aprendizaje_desarrollo int not null, 
    observaciones varchar(45), 
    primary key(Id_registro) 
);

And in a .csv file I have the following data:

1,5/24/2016, 69 , 69 , 83 , 73 ,Hubo muy pocas ventas ese dia

When I try to make an insert from the .csv file I get the following error message:

  

Error Code: 1265. Data truncated for column 'Registration_id' at row 1 0.109 sec

Why do I get this error? If according to me I declared my variables well. How can I solve it?

    
asked by Teresa Castro 25.05.2016 в 03:54
source

1 answer

1

This error occurs because you try to insert a size value larger than the one allowed in the field (for example, the string 'TEST' that has 6 characters in a field CHAR(5) ).

I would recommend that you open the .csv file with a text editor or with Excel and verify that the values of the columns conform to the values of the columns in the target table in the database.

    
answered by 25.05.2016 в 04:07