Where Statement Causes Query to Fail
Can't figure out why this line, borrowed from another date forum inquiry, doesn't work?
"(ACCDATE >= TO_DATE('" + beginDate + " 00:00:00','MM/DD/YYYY HH24:MI:SS') AND ACCDATE <= TO_DATE('" + endDate + " 00:00:00','MM/DD/YYYY HH24:MI:SS')"
Accdate is of type date and my regional settings on my pc show that my short date format is MM/dd/yyyy
Walter
-
Assuming you are using AGS 10.2.x, you may need to reconfig this query due to the fact that Standardized SQL queries are enabled, by default. More info: http://resources.arcgis.com/en/help/main/10.2/index.html#//015400000641000000
You can either diable these on the ArcGIS Server side, or re-write your query to fit the standardized query format, which you can test at your AGS service's rest endpoint/query.
Ryan
0 -
Ryan,
Thanks for your reply. Will attempt to use your links to rewrite my query.
Walter
0 -
Ryan,
The Standardized SQL queries were enabled. So I'm posting my solution, thanks to your help.
"AccDate >= DATE '" + beginDate + "' AND AccDate <= DATE '" + endDate + "'"
Walter
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare