https://bugs.freedesktop.org/show_bug.cgi?id=53867
--- Comment #8 from Tyler <[email protected]> 2012-08-21 16:27:31 UTC --- Hi Alex, Thank you for your comments. I will try to address them all, and if this is not a true bug, we will mark it as such and move on. When you connected to MySQL, under 'Connect to an existing database' did you choose MySQL? On the next screen, 'Set up MySQL Connection', is where I specified to use the JDBC. I only stress this because I'm aware of JDBC being an option at the beginning, and (while it probably does) I'm not sure if it works the same. My query is this: SELECT AVG( `sys` ) AS `Systolic`, AVG( `dia` ) AS `Diastolic` FROM `Reading` WHERE `date` >= DATE_SUB( NOW( ), INTERVAL 2 WEEK ) I'm using DATE_SUB in the WHERE clause, and I'm not sure how using an alias would help. As for using Tools -> SQL..., I was merely using it to show that the statement ran successfully. It does in fact, run successfully on mine, too. I don't imagine the parser checks here, so it wouldn't have a problem. As to using 'Run SQL command directly' inside of the Query Builder, this worked. My statement ran (I took out the grave accents) just fine with this on. I didn't have this on before (I didn't know exactly what it did), and the problem was the INTERVAL 2 WEEK part. If I enclosed it all in a string 'INTERVAL 2 WEEK', the parser was happy, and it let me save and close it with no errors. Obviously, MySQL threw an exception when it was given that statement with 'INTERVAL 2 WEEK' in quotes though. I leave the future of this report up to you as you have more experience than I. On my end, the SQL parser will not let statements with DATE_ADD or DATE_SUB through, but turning the parser off allows me to run the same statement with no error. That sounds like a bug to me, but as I develop all of my queries in MySQL first, I'll probably never turn the Parser back on anyway (I won't have to add grave accents). As this is a problem with the SQL Parser (on my end at least), my original bug description may not be valid anymore. Since I can just turn the parser off, I can get back to business. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
