Skip to main content

Query Task "Where" syntax

Comments

4 comments

  • Permanently deleted user

    I think what you want is:

    "LAST_NAME = ('" + lastName.ToString() + "') AND FIRST_NAME = ("' + firstName.ToString() + "')"

    In the end, this is all a sting representing the where clause.

    Cheers,

    Chris.

    0
  • Permanently deleted user

    Thanks Chris.  Small typo in your suggestion (quote and single quote nesting) but this string worked:

    "LAST_NAME = ('" + lastName.ToString() + "') AND FIRST_NAME = ('" + firstName.ToString() + "')"

    0
  • Permanently deleted user

    Hi Steven,

    Good to see you got it work!

    I have a question regarding to query non-spatial database tables.

    What is the Query Task Url value if I were to query a MS SQL database table? Were you querying a non-spatial database?

    Thanks!!

    Alex

    0
  • Permanently deleted user

    The query task acess a ArcGIS Server Map Server service endpoint and communicates using REST. That is why the Activity is located in the ArcGIS server section - it is the ArcGIS Server service that translates this query into a SQL statement which it fires against the geodatabase. 

    You can't use the activity to query directly on a SQL database neither a non-ArcGIS Server services.

    - Sune

    0

Please sign in to leave a comment.