Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to use TO_DATE to query an Oracle SDE dataset. It's not working in the javascript API application so I tried to query the rest end point directly and I get the error:

"Unable to perform query" on a java version of AGS I also get the error "Please check your parameters"

Here is the ESRI topic at 10 which shows how to_date should be used http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm

The format: Datefield = TO_DATE('yyyy-mm-dd hh:mm:ss','YYYY-MM-DD HH24:MI:SS') My Query: DateTest = TO_DATE('2012-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')

I have also tried not including the time and using / instead of -

Oracle version is 10g. ArcGIS server is version 10 (.net and java tried)

Thanks for your help

share|improve this question
Have you tried running the sql in a sqlplus window? i.e. select to_char(TO_DATE('2012-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')) from dual; Does it return an error? It maybe something with your locale? –  mapoholic Jul 26 '12 at 14:59
add comment

1 Answer

I was having the same issue and recycling the application pool followed by a cache clear of the 10.0 rest fixed the problem. I believe I have to figure out how to configure my application pool better so these errors don't happen. That was the quick fix anyway.

Let me know if that helps :)

share|improve this answer
I'm off the project now but thanks for the suggestion. I will be sure to try it next time. –  David Wilton Aug 8 '13 at 9:07
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.