Skip navigation links

MySQL Forums :: Newbie :: Problem with warning "data truncated for column "u" at row 1"


Advanced Search

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?

Options: ReplyQuote


Subject Written By Posted
Problem with warning "data truncated for column "u" at row 1" Pepijn Bicker 11/06/2009 08:27AM
Re: Problem with warning "data truncated for column "u" at row 1" Rick James 11/07/2009 03:56PM
Re: Problem with warning "data truncated for column "u" at row 1" Pepijn Bicker 11/13/2009 02:02PM


Sorry, only registered users may post in this forum.