Can 10.2 answer Oracle where clause?

2776
2
Jump to solution
03-03-2014 05:10 AM
FilipKrál
Occasional Contributor III
Hi, I am having trouble implementing some functionality we have on our 9.3 and 10.0 servers with version 10.2 (all internal servers so cannot share URLs)

I need to run a query against a feature class stored in Oracle (ArcSDE 9.3) with where clause that reads something like this (is generated from a mouse-click):

sdo_nn(shape, mdsys.sdo_geometry(2001, 81989, mdsys.sdo_point_type(385878.8,247670.9,null),null,null), 'sdo_num_res=1', 1) = 'TRUE'  AND  sdo_within_distance(shape , mdsys.sdo_geometry(2001, 81989, mdsys.sdo_point_type(385878.8,247670.9, null), null, null),'distance=250 UNIT=M') = 'TRUE'


We use this to get features that are within certain distance from a user defined (clicked) point in our JavaScript app, it has been much faster than using Esri spatial filters.

If I use this where clause in the HTML interface of query tasks in services directories, it works for the services published from ArcGIS Server 9.3 and 10.0, but for the service at 10.2 i get:
code: 400, message: "Unable to complete operation."

I would appreciate any help.
Filip.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor
starting at 10.2 where-clauses that do not conform to the StandardizedQueries specifications get error out.
if you really need to use database specifics functions etc. in the where-clause, you need to turn StandardizedQueries off.

please read carefully about pros and cons before disabling StandardizedQueries: http://resources.arcgis.com/en/help/main/10.2/index.html#//015400000641000000

View solution in original post

0 Kudos
2 Replies
TanuHoque
Esri Regular Contributor
starting at 10.2 where-clauses that do not conform to the StandardizedQueries specifications get error out.
if you really need to use database specifics functions etc. in the where-clause, you need to turn StandardizedQueries off.

please read carefully about pros and cons before disabling StandardizedQueries: http://resources.arcgis.com/en/help/main/10.2/index.html#//015400000641000000
0 Kudos
MarcoBoeringa
MVP Regular Contributor
please read carefully about pros and cons before disabling StandardizedQueries: http://resources.arcgis.com/en/help/main/10.2/index.html#//015400000641000000


and maybe this:

http://en.wikipedia.org/wiki/SQL_injection
0 Kudos