On Mon, 2011-04-11 at 20:29 +1000, Andrew Walsh wrote:
> Hi Gabriel,
>
> Had to reply to you from my gmail account and I couldn't reply from
> my work email for next few days. So this reply may not make it
> to the geoserver-users list as its from my gmail address
> which isn't registered with the users list. Anyway your reply
> to me should capture my response to the list.
>
> To answer your question the type of column is Oracle DATE.
> A WHERE clause should compare a date to a date and look like:
>
> WHERE TEST.BEACH_TEMPS.LOCATION = 'Bilgola' AND
> TEST.BEACH_TEMPS.OBS_DATE_TIME >
> to_date('2011-01-01 00:01:00','YYYY-MM-DD HH24:MI:SS')'
>
> Problem seems that it is comparing a date to a string like
> 'Sat Jan 01 00:01:00 EST 2011'.
yup. I'm not sure if the ArcSDE Java API has something that abstract out
date/time handling from the underlying RDBMS details, or I should be
checking what the underlying RDBMS is and then format the where clause
appropriately. All that assuming what's getting down to the DataStore is
properly converted to the appropriate Java type, which I'm not sure
either.
In any case, would you be so kind of opening a JIRA issue for the
GeoTools ArcSDE plugin at [1]?
That way we could keep the discussion tied to the issue. Are you in
possition of debugging and contributing a patch back? I can't say for
sure when I'll have the spare time to dedicate to it but would be glad
of reviewing a patch.
Cheers,
Gabriel
>
> Andrew
>
> On 4/11/11, Gabriel Roldán <[email protected]> wrote:
> >
> >>
> >> I also tried to implement date comparsion using the cql_filter and the
> >> 'AFTER'
> >> operator
> >> as follows but this didn't work:
> >>
> >> http://server.metoc.gov.au:8080/geoserver/wfs?request=GetFeature&typeName=TEST:TEST.BEACH_TEMPS&cql_Filter=LOCATION%3D%27Bilgola%27%20AND%20OBS_DATE_TIME%20AFTER%202011-01-01T00:01:00Z&version=1.1.0&outputFormat=csv
> >>
> >> This gave back 0 results and the following error msg. in the
> >> geoserver.log:
> >>
> >> 2011-04-11 13:39:31,083 WARN [data.ArcSDEQuery] - Error fetching row for
> >> TEST.BEACH_TEMPS[
> >> Filter: [[ LOCATION = Bilgola ] AND [ OBS_DATE_TIME > Sat Jan 01 00:01:00
> >> EST
> >> 2011 ]]
> >> where clause sent: (TEST.BEACH_TEMPS.LOCATION = 'Bilgola' AND
> >> TEST.BEACH_TEMPS.OBS_DATE_TIME > 'Sat Jan 01 00:01:00 EST 2011')
> >> geometry filter:Filter.INCLUDE
> >> org.geotools.arcsde.ArcSdeException: [SDE error -51][Error desc=DATABASE
> >> LEVEL
> >> ERROR OCCURRED.][Extended desc=
> >> ]
> >>
> >> Looks like Oracle was not liking the SQL sent to it.
> > Indeed it is not, and yeah it looks like a bug in the ArcSDE GeoTools
> > plugin. How should the where clause look like and what type is the
> > column?
> >
> > Gabriel.
> >>
> >> Andrew Walsh
> >>
> >>
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Xperia(TM) PLAY
> >> It's a major breakthrough. An authentic gaming
> >> smartphone on the nation's most reliable network.
> >> And it wants your games.
> >> http://p.sf.net/sfu/verizon-sfdev
> >> _______________________________________________
> >> Geoserver-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >
> > --
> > Gabriel Roldan
> > [email protected]
> > Expert service straight from the developers
> >
> >
--
Gabriel Roldan
[email protected]
Expert service straight from the developers
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users