Is there a way to use SQL Join in QueryTask Where clause?

875
1
06-19-2017 07:25 AM
BlairJones
New Contributor III

I have a feature layer depicting many locations of wildlife collection efforts.   I have a table of species codes observed for each effort.  I have a table of characteristic codes assigned to each species code.  Each effort can identify many different critters.  Each critter has been assigned several codes from a list of characteristics. Using https://js.arcgis.com/3.20/ . If ArcGIS used standard SQL, I would be able to use Join in my Where clause to query and select effort features based on species code and/or characteristic codes; but in reading the documentation for QueryTask Where, it seems JOIN is not supported.  Have I misunderstood?  What is the best practice method, using ArcGIS JavaScript API, to query using SQL Join to a feature attribute?

0 Kudos
1 Reply
ThomasSolow
Occasional Contributor III

Whenever I've had to join two tables, I set up the join in arcmap, and then I queried for related records in the browser.  My recollection is that the relationship has to be set on the service, and once that's been set, then the browser can query based on that relationship.

I don't remember the exact details of this process, but it wouldn't surprise me if there's no way to perform a join from the browser alone.

0 Kudos