<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcGIS Pro: use layer name in SQL in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417928#M18608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg - not sure if this will help you or not but it's a start - &lt;A href="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-F5320DB5-4E54-4D49-BF31-A58F5379ED9F"&gt;http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-F5320DB5-4E54-4D49-BF31-A58F5379ED9F&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 22:27:55 GMT</pubDate>
    <dc:creator>Robert_LeClair</dc:creator>
    <dc:date>2017-03-15T22:27:55Z</dc:date>
    <item>
      <title>ArcGIS Pro: use layer name in SQL</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417927#M18607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to select records using "Select Layer by Attribute" using a subquery. My input to the query is a layer (review_records) in the project that has a definition query applied (field "Assessment" is null); the source is a File Geodatabase feature class. I can do simple queries using the edit clause mode without any problems. However, when I try and use SQL with a subquery I cannot reference the layer name, only the underlying feature class name. This statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECTID = (SELECT MIN(OBJECTID) FROM review_records)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;won't validate. The same statement referencing the feature class name validates fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECTID = (SELECT MIN(OBJECTID) FROM ben_fp)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it does not return any selected records as the minimum OBJECTID value does not meet the condition set in the definition query. If I change MIN to MAX one record is selected as I would expect (the max objectid record has NULL for the assessment field).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like I'm missing something obvious--is there a better way to do this (other than creating a new feature class that only has NULL assessment values)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 21:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417927#M18607</guid>
      <dc:creator>Greg_Yetman</dc:creator>
      <dc:date>2017-03-15T21:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro: use layer name in SQL</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417928#M18608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greg - not sure if this will help you or not but it's a start - &lt;A href="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-F5320DB5-4E54-4D49-BF31-A58F5379ED9F"&gt;http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-F5320DB5-4E54-4D49-BF31-A58F5379ED9F&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 22:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417928#M18608</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2017-03-15T22:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro: use layer name in SQL</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417929#M18609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert. That's the documentation I used to construct my subquery. I noticed that it says that subqueries are "...&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;supported by geodatabase data sources only". I had assumed that this included layers based on data in a Geodatabase but I guess that subqueries are only supported on the feature classes and tables in a Geodatabase, not layers&amp;nbsp;or table views.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;I guess that I'll have to find a workaround. This is for a work task in Pro that I'm developing that will be used repeatedly, so creating a new feature class is not a good option.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 02:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-use-layer-name-in-sql/m-p/417929#M18609</guid>
      <dc:creator>Greg_Yetman</dc:creator>
      <dc:date>2017-03-16T02:28:33Z</dc:date>
    </item>
  </channel>
</rss>

