Re: Perfectly valid MySQL query gives syntax error in LibreOffice Base (was: the other way around)
- From: Keith Clark <keithclark@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 May 2011 18:09:47 -0400
On Fri, 2011-05-20 at 23:52 +0200, Amedee Van Gasse wrote:
On 05/20/11 23:44, Amedee Van Gasse wrote:I might be wrong, but when using Base for MySQL connectivity you have to
Same query, rewritten from scratch:
SELECT YEAR(logfiledate) AS Year, MONTH(logfiledate) AS Month, UserId,
Name, FirstName, Cat, SUM(TotalTime) AS TotalTime
FROM Sessions
LEFT JOIN Logfiles on Sessions.LogFile = Logfiles.logfile
LEFT JOIN Users on UserId = Trigram
WHERE YEAR(logfiledate) = 2010
AND MONTH(Logfiles.logfiledate) = 12
GROUP BY UserId
ORDER BY TotalTime DESC, UserId ASC
LIMIT 0, 10
Much cleaner, methinks.
Thanks to all who contributed, or for just being my wall.
Case closed.
Case not entirely closed.
Now I have a perfectly valid MySQL query, verified with phpMyAdmin, and
LibreOffice Base claims that I have syntax terror in SQL expression.
I think I'll have to file that bug report after all...
use the ` quotes. If using the HSQL, you use the " quotes. It has been
awhile since I used Base but I seem to remember that frustrating me a
lot when trying to use it for quick development of SQL code and then
copy pasting that into phpMyAdmin.
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- References:
- LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- From: Amedee Van Gasse
- Re: LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- From: Daniel Kreuter
- Re: LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- From: Amedee Van Gasse
- Re: LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- From: Jordon Bedwell
- Re: LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- From: Amedee Van Gasse
- Re: LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- From: Amedee Van Gasse
- Perfectly valid MySQL query gives syntax error in LibreOffice Base (was: the other way around)
- From: Amedee Van Gasse
- LibreOffice Base MySQL query gives error 1064 in phpMyAdmin
- Prev by Date: Re: [OT]Re: [11.10_Alpha1]-Will Classic Gnome Be An Option?
- Next by Date: Invitation to connect on LinkedIn
- Previous by thread: Perfectly valid MySQL query gives syntax error in LibreOffice Base (was: the other way around)
- Next by thread: LTSP ?
- Index(es):
Relevant Pages
|