Incorrect sql syntax for date fields in Oracle Spatial
------------------------------------------------------
Key: GEOT-3960
URL: https://jira.codehaus.org/browse/GEOT-3960
Project: GeoTools
Issue Type: Bug
Components: jdbc-oracle plugin
Affects Versions: 2.7.3
Reporter: Matt Priour
Assignee: Andrea Aime
When doing OGC or CQL filtering against a date field in WMS requests, the date
criteria is not converted to the proper format. However, the same filter used
in WFS is properly converted and works.
Below is an example of the filter used:
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>WORK_END_DATE</ogc:PropertyName>
<ogc:Literal>2011-11-30T05:00:00.000Z</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>
Here is the attribute part of the SQL query that was produced:
... WHERE (WORK_END_DATE > '2011-11-30 05:00:00') ...
When run directly against Oracle, the query produces a "Format does not match
known format" error
Here is the same part of the SQL query adjusted so that it works properly:
... WHERE (WORK_END_DATE > to_date('2011-11-30 05:00:00','yyyy-mm-dd
HH:MI:SS')) ...
It looks like the to_date function with the explicit format string are required
for this query to run properly
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel