Apache OpenOffice (AOO) Bugzilla – Issue 22364
Can't compare MySQL date field to date function in query design view
Last modified: 2006-05-31 14:29:06 UTC
I created a MySQL database with OOo that includes a couple fields formatted as DATE. When creating or editing a query in the design view I get an error when trying to compare that column with CURDATE(). The error says, "The field cannot be compared with a date". But if I create the query in SQL view as, for example, SELECT FirstName, LastName IN tbl_MemberData WHERE DateJoined=CURDATE() the query runs fine. But when I then go to edit the query, it always comes up in design view, instead of SQL view. At this point I can no longer edit my query. I get "SQL syntax error" or some other sql error.
Almost forgot, I'm using MySQL 4.0.14, MyODBC 3.51.06, and unixODBC 2.0.6 on Gentoo Linux.
correcting sub component (see http://www.openoffice.org/issues/describecomponents.cgi?component=Database%20access, please), and default owner
Hi, I can reproduce this behaviour. As a workaround you can switch on the native mode in the SQL view. Then the query is open in the SQL view the next time. MSC->OJ: Maybe the query could be open in the SQL View if the Query Design can not parse the query correct. Bye Marc
Thanks, MSC (sorry - I don't know your real name). I couldn't get to native mode from editing the query using the Explorer, but by going to Tools - Data Sources - Query, I was easily able to edit the SQL by clicking the SQL button. For some reason, that doesn't work going through Explorer. I get an "SQL Syntax error". -Marc
fixed in cws oj08
change subcomponent to 'none'
.
set to fixed
verify in CWS oj08
Hi, fixed in current developer build -> close. The current developer build can be found at http://download.openoffice.org/680/index.html Feel free to reopen if this issue is not fixed in the developer build. Bye Marc