<?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>idea Definition Query Based on Related Table in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idi-p/947595</link>
    <description>&lt;P&gt;It would be nice if I could perform a definition query based on fields in a related table in a 1:M or M:M relationship.&lt;/P&gt;&lt;!--  content transformation source ID: 087300000008I22  --&gt;</description>
    <pubDate>Thu, 28 Jul 2022 19:40:26 GMT</pubDate>
    <dc:creator>BrandonJones</dc:creator>
    <dc:date>2022-07-28T19:40:26Z</dc:date>
    <item>
      <title>Definition Query Based on Related Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idi-p/947595</link>
      <description>&lt;P&gt;It would be nice if I could perform a definition query based on fields in a related table in a 1:M or M:M relationship.&lt;/P&gt;&lt;!--  content transformation source ID: 087300000008I22  --&gt;</description>
      <pubDate>Thu, 28 Jul 2022 19:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idi-p/947595</guid>
      <dc:creator>BrandonJones</dc:creator>
      <dc:date>2022-07-28T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query Based on Related Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/947596#M6557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;has this been enabled yet?&amp;nbsp;

&lt;!-- content transformation source ID: 00aE0000000Vgbl --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:56:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/947596#M6557</guid>
      <dc:creator>ChristiNelson1</dc:creator>
      <dc:date>2012-08-10T14:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query Based on Related Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/947597#M6558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You can do this now without a relationship class, but it requires both features classes&amp;nbsp;be in&amp;nbsp;the same&amp;nbsp;geodatabase. Below is an example query:&lt;BR /&gt;&lt;BR /&gt;"STATE_NAME" IN (SELECT "NAME" FROM states WHERE "POP1990" &amp;gt; 1000000)&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;In the query&amp;nbsp;above I&amp;nbsp;am&amp;nbsp;selecting the Cities by the State they are related to whose State's population is greater than 10 million. Below is the format of the query explained&lt;BR /&gt;&lt;BR /&gt;"{Primary Key Name}" IN (SELECT "{Foriegn Key Name}" FROM&amp;nbsp;{Destination Table/FC Name}&amp;nbsp;WHERE {WHERE clause to be run for related table})

&lt;!-- content transformation source ID: 00aE0000000Vgyu --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2012 17:45:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/947597#M6558</guid>
      <dc:creator>ChrisFox</dc:creator>
      <dc:date>2012-08-10T17:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query Based on Related Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/947598#M6559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The Definition Query fields from a joined table are available.&amp;nbsp; Why not a related table?

&lt;!-- content transformation source ID: 00aE0000000WYp2 --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 22:24:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/947598#M6559</guid>
      <dc:creator>BenjaminKnott2</dc:creator>
      <dc:date>2012-10-09T22:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query Based on Related Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/1213182#M21267</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/74321"&gt;@ChrisFox&lt;/a&gt;I&amp;nbsp;had never tried the SQL syntax you outlined, but this expression does work in ArcMap and ArcGIS Pro for related data in the same geodatabase.&amp;nbsp; This syntax is only briefly discussed in the Subqueries section of the &lt;A title="SQL Reference" href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" target="_self"&gt;SQL reference for query expressions used in ArcGIS&lt;/A&gt; website.&amp;nbsp; That section doesn't include an example that was quite as clear or useful to me as the one you have given.&amp;nbsp; I frankly would like to see your example added to that section, since if it had been there years ago I would have been much more likely to see the usefulness of this approach and not had to develop some of the workarounds I came up with.&lt;/P&gt;&lt;P&gt;Your example works for file geodatabases as well, despite the warning that file geodatabases only offer limited support for subqueries.&amp;nbsp; The Subqueries section basically says that help for using them is specific to the&amp;nbsp;&lt;SPAN&gt;DBMS documentation of my&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;enterprise geodatabase.&amp;nbsp;&lt;/SPAN&gt; Since I've mostly worked with file geodatabases that limitation warning had kept me from even trying to figure out or use Subqueries, but based on the example you have outlined I believe I actually now have a use for them.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 21:41:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/definition-query-based-on-related-table/idc-p/1213182#M21267</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2022-09-15T21:41:56Z</dc:date>
    </item>
  </channel>
</rss>

