Problem with warning "data truncated for column "u" at row 1"
Posted by:
Pepijn Bicker ()
Date: November 06, 2009 08:27AM
I have a function where I declare a variable:
DECLARE u DECIMAL(65,10);
Then I set the variable:
SET u = ((x3-x1)*(x2-x1)+(y3-y1)*(y2-y1))/(POW(x2-x1,2)+POW(y2-y1,2));
where the type of xn and yn is the same as u. I tried truncating the result:
SET u = TRUNCATE(((x3-x1)*(x2-x1)+(y3-y1)*(y2-y1))/(POW(x2-x1,2)+POW(y2-y1,2)),9);
But I still get the warning. Does anyone know what I am doing wrong?
Sorry, only registered users may post in this forum.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.