#1366 - Incorrect decimal value mysql
Posted: Thu Oct 22, 2009 2:15 pm
Hi, i use the following query to create a table
when i try to isert some values in it
I get the #1366 - Incorrect decimal value, does anyone knows what am i doing wrong?
I've tried some tricks, like declaring the decimals as varchar at the create statement, and then updating the fields as decimals, but then i get
I've read some threads around but i don't get it, any help would be appreciated!
Thanks in advance!
Code: Select all
CREATE TABLE inouts (dmid int not null AUTO_INCREMENT, proj_id smallint(8) unsigned default NULL, name VARCHAR(35),a DECIMAL(6,3),b DECIMAL(6,3),c DECIMAL(6,3),d DECIMAL(6,3),PRIMARY KEY (`dmid`,`proj_id`), FOREIGN KEY (proj_id) REFERENCES projects (proj_id) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB
Code: Select all
INSERT INTO inouts (`dmid`,`name`,`a`,`b`,`c`,`d`) VALUES ('1' ,'name' ,'1,5' ,'0,2' ,'1,4' ,'0,35');
I've tried some tricks, like declaring the decimals as varchar at the create statement, and then updating the fields as decimals, but then i get
Code: Select all
('name' ,'1,00' , '0,00' , '1,00' , '0,00'); Thanks in advance!