I have a question on the esearch widget.
I am trying to get to select date ranges from an oracle DB.
here is the code I am using but it will not work.
do you have any suggestions?
<value prompt="[Example: 2012-02-02]" > (UTC_DATE) >= TO_DATE('[value]','YYYY-MM-DD HH24:MI:SS')</value>
thanks
Solved! Go to Solution.
ok
I figured it out.
I did not have this parameter set on the older install
fyi: you get to this switch by connecting to the /admin folder and then system> properties> update and typing "standardizedQueries": "false" between the { } in the box.
the date query now works just fine.
thanks for your attention and ideas!!!
Glen,
I don't have an oracle DB to test on but does that SQL syntax work when doing the query in ArcMap?
yes it is
I have called tech support
i'll let you know what the answer is after they work it out
thanks for responding
Glenn,
Your map service is not public is it?
How about something like this?
<value prompt="Example: 2012-02-02" isvaluerequired="true"dateformat="YYYY-MM-DD" useutc="true">UTC_DATE >= '[value] 00:00:00'</value>
I don't have Oracle either, but this is working in SQL. Looks like you were trying to evaluate between two fields UTC_Date>=TO_DATE (times the value).
If not working, I put the uniquevalsfromfield="UTC_DATE" in there to get an idea of the format it was finding in the date field.
R_
unfortunately oracle data/time fields are different that SQLserver.
I have gained one bit of knowledge from tech support but I still don't have a solution.
it turns out there is a parameter in arcserver that turns off/on standardized query SQL. by turning it off then Dbase level queries like one I initially posted should work.
fyi: you get to this switch by connecting to the /admin folder and then system> properties> update and typing "standardizedQueries": "false" between the { } in the box.
Glen,
So did you try a standard date query like Rhett suggested?
ok now I am thinking this is a arcserver 10.2.1 issue.
I have another setup with 10.2.2 that I have been testing.
the date query works with the original syntax.
(UTC_DATE) >= TO_DATE('[value]','YYYY-MM-DD HH24:MI:SS')
I will upgrade the older one and see what happens.
I wish these issue were not so hard to sort out.
i have a help call into esri but maybe they haven't looked at the specific version.
or maybe there is something else different.
ok
I figured it out.
I did not have this parameter set on the older install
fyi: you get to this switch by connecting to the /admin folder and then system> properties> update and typing "standardizedQueries": "false" between the { } in the box.
the date query now works just fine.
thanks for your attention and ideas!!!