Select to view content in your preferred language

esearch widget and date ranges

1200
8
Jump to solution
07-22-2014 12:02 PM
glennhazelton
Deactivated User

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) &gt;= TO_DATE('[value]','YYYY-MM-DD HH24:MI:SS')</value>

thanks

glenn.hazelton@mwra.com

0 Kudos
1 Solution

Accepted Solutions
glennhazelton
Deactivated User

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!!!

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Glen,

   I don't have an oracle DB to test on but does that SQL syntax work when doing the query in ArcMap?

0 Kudos
glennhazelton
Deactivated User

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Glenn,

   Your map service is not public is it?

0 Kudos
RhettZufelt
MVP Notable Contributor

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_

0 Kudos
glennhazelton
Deactivated User

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.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Glen,

   So did you try a standard date query like Rhett suggested?

0 Kudos
glennhazelton
Deactivated User

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) &gt;= 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.

0 Kudos
glennhazelton
Deactivated User

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!!!

0 Kudos