Issue 22364 - Can't compare MySQL date field to date function in query design view
Summary: Can't compare MySQL date field to date function in query design view
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-12 02:03 UTC by godboutm
Modified: 2006-05-31 14:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description godboutm 2003-11-12 02:03:50 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.
Comment 1 godboutm 2003-11-12 02:08:38 UTC
Almost forgot, I'm using MySQL 4.0.14, MyODBC 3.51.06, and unixODBC
2.0.6 on Gentoo Linux.
Comment 2 Frank Schönheit 2003-11-12 07:51:14 UTC
correcting sub component (see
http://www.openoffice.org/issues/describecomponents.cgi?component=Database%20access,
please), and default owner
Comment 3 marc.neumann 2003-11-12 09:12:58 UTC
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
Comment 4 godboutm 2003-11-13 02:51:14 UTC
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
Comment 5 ocke.janssen 2004-01-30 14:14:35 UTC
fixed in cws oj08
Comment 6 hans_werner67 2004-02-02 12:18:11 UTC
change subcomponent to 'none'
Comment 7 ocke.janssen 2004-02-02 14:10:32 UTC
.
Comment 8 marc.neumann 2004-03-02 10:29:49 UTC
set to fixed
Comment 9 marc.neumann 2004-03-02 10:30:07 UTC
verify in CWS oj08
Comment 10 marc.neumann 2004-04-27 10:21:54 UTC
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