Shadowing Posted July 31, 2012 Share Posted July 31, 2012 Hey guys getting hit with a error that i cant figure out #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS result' at line 6 SELECT (400 + ((2 - 1) * 600)) + ((400 + ((4 - 1) * 600)) - (400 + ((2 - 1) * 600)) * (1 - (((1343715769 - 1343715694) - (1343715814 - 1343715694)) / (1343715769 - 1343715694))) - (CEIL((400 + ((2 - 1) * 600)) + ((400 + ((4 - 1) * 600)) - (400 + ((2 - 1) * 600))) / 600)) AS result Quote Link to comment Share on other sites More sharing options...
memfiss Posted July 31, 2012 Share Posted July 31, 2012 one more ) before AS result SELECT (400 + ((2 - 1) * 600)) + ((400 + ((4 - 1) * 600)) - (400 + ((2 - 1) * 600)) * (1 - (((1343715769 - 1343715694) - (1343715814 - 1343715694)) / (1343715769 - 1343715694))) - (CEIL((400 + ((2 - 1) * 600)) + ((400 + ((4 - 1) * 600)) - (400 + ((2 - 1) * 600))) / 600))) AS result; +----------+ | result | +----------+ | 598.0000 | +----------+ 1 row in set (0.00 sec) Quote Link to comment Share on other sites More sharing options...
Christian F. Posted July 31, 2012 Share Posted July 31, 2012 Just for your information, but there's a lot of unnecessary parentheses there, which you could with great success remove. Would make it a lot easier to keep track of them all, and avoid such problems in the future. Quote Link to comment Share on other sites More sharing options...
Shadowing Posted July 31, 2012 Author Share Posted July 31, 2012 I figured out a way i can shrink the math a little more by doing some of the math on a insert but ya i should put it in one 1 so i can at least see it better lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.