How to use a Query that References Two Tables of a Map Service

496
1
Jump to solution
02-08-2017 06:24 AM
WilliamMiller4
Occasional Contributor II

Hi,

I need to query two tables from a map service. Below is how the SQL statement I would like to use might look.

var queryString = "";
//from URL_For/MapServer/2
queryString += "Neighborhood_ID = '" + this.m_Neighborhood + "'";
queryString += " AND Use_Code_Dsc = '" + this.m_UseCodeOne + "'";
//from URL_For/MapServer/1
queryString += " AND convey_date = " + this._formatSqlDate(this.m_SaleDateSingle);
queryString += " AND consideration " + this.m_SalePriceOperatorDisplay + " " + this.m_SalePriceSingle;
query.where = queryString‍‍‍‍‍‍‍

How would I use QueryTask? I have two URLs. Is there a way to join the tables and then perform the QueryTask?

Thank you for your time.

William

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

William,

   You will want to join the data in ArcMap and then publish a new map service that you can then query.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Esteemed Contributor

William,

   You will want to join the data in ArcMap and then publish a new map service that you can then query.