<?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 Grant ability to select based on related tables (inner join, outer join) in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idi-p/1154724</link>
    <description>&lt;P&gt;While there are roundabout ways to make this happen, it would be nice to be able to alter not only the WHERE clause, but also the FROM clause so that we can incorporate inner and outer joins to other layers and tables. Or, at the very lease, when a relate is established between tables, allow the fields from the related tables to show up in the Select by Attributes and other query builder dialogs.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2022 16:18:49 GMT</pubDate>
    <dc:creator>MarcusVowell_Uniti</dc:creator>
    <dc:date>2022-03-17T16:18:49Z</dc:date>
    <item>
      <title>Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idi-p/1154724</link>
      <description>&lt;P&gt;While there are roundabout ways to make this happen, it would be nice to be able to alter not only the WHERE clause, but also the FROM clause so that we can incorporate inner and outer joins to other layers and tables. Or, at the very lease, when a relate is established between tables, allow the fields from the related tables to show up in the Select by Attributes and other query builder dialogs.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 16:18:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idi-p/1154724</guid>
      <dc:creator>MarcusVowell_Uniti</dc:creator>
      <dc:date>2022-03-17T16:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154802#M19042</link>
      <description>&lt;P&gt;Have you checked out Query Layers? You can do all of that with a query layer. If it's things like shapefiles, web layers, etc., that's what the ad-hoc "add join" and "add related" tools are for in the map.&lt;/P&gt;&lt;P&gt;When there is a real relationship class in the database, you ought to be able to see related records for a selected feature in the &lt;STRONG&gt;Attributes&lt;/STRONG&gt; pane.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 14:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154802#M19042</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-03-17T14:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join) - Status changed to: Needs Clarification</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154877#M19045</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425494"&gt;@MarcusVowell_Uniti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would you mind add some of your use cases/workflows here? thanks&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 16:19:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154877#M19045</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2022-03-17T16:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154881#M19046</link>
      <description>&lt;P&gt;This is the old Keyfile select capability from Arcplot, it is very much needed in Pro.&amp;nbsp; I have emulated it with a script tool but its not ideal.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 16:27:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154881#M19046</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2022-03-17T16:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154890#M19047</link>
      <description>&lt;P&gt;oh gosh!&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1173"&gt;@BruceHarold&lt;/a&gt;&amp;nbsp;I can't seem to recall that arcplot use case. You have anything that I can use to juggle my old memory &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 16:35:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154890#M19047</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2022-03-17T16:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154895#M19048</link>
      <description>&lt;P&gt;Like this:&amp;nbsp;&amp;nbsp;&lt;A href="https://pm.maps.arcgis.com/home/item.html?id=e638afe0695a4ad38388cb8d9b350446" target="_blank"&gt;https://pm.maps.arcgis.com/home/item.html?id=e638afe0695a4ad38388cb8d9b350446&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Selections are propagated based on shared values of two fields, one in each layer/view.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 16:40:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154895#M19048</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2022-03-17T16:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154911#M19049</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2620"&gt;@TanuHoque&lt;/a&gt;&lt;/P&gt;&lt;P&gt;For instance, a geospatial table of fiber optic cable is foreign keyed to a table listing leasing agreements that have a customer ID listed in each record. That customer ID is, in turn, foreign keyed to a customers table. I need to select all cables a specific customer by name is on. With SQL, I would do this with this query:&lt;/P&gt;&lt;P&gt;SELECT cable.* FROM cable INNER JOIN agreements ON cable.agreementid = agreements.id INNER JOIN customer ON agreements.customerid = customer.id&amp;nbsp; WHERE customer.name = 'AT&amp;amp;T'&lt;/P&gt;&lt;P&gt;Many of the databases we use have a chain of foreign keys that need to be used to select the right subset of data. In fact, what I would dearly love to see is the ability to utilize nested SELECT statements in the WHERE clause:&lt;/P&gt;&lt;P&gt;SELECT * FROM cable WHERE ownership NOT IN (SELECT id FROM owner WHERE status = 'Inactive')&lt;/P&gt;&lt;P&gt;But I know that's probably a long shot. Just being able to consider more than one table in a SELECT criteria would be fantastic.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 17:13:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1154911#M19049</guid>
      <dc:creator>MarcusVowell_Uniti</dc:creator>
      <dc:date>2022-03-17T17:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join) - Status changed to: Open</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160309#M19222</link>
      <description />
      <pubDate>Fri, 01 Apr 2022 15:56:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160309#M19222</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2022-04-01T15:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160311#M19223</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1173"&gt;@BruceHarold&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425494"&gt;@MarcusVowell_Uniti&lt;/a&gt;&amp;nbsp;for providing clarifications. They are very helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 16:00:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160311#M19223</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2022-04-01T16:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160374#M19224</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425494"&gt;@MarcusVowell_Uniti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Many of the databases we use have a chain of foreign keys that need to be used to select the right subset of data. In fact, what I would dearly love to see is the ability to utilize nested SELECT statements in the WHERE clause:&lt;/P&gt;&lt;P&gt;SELECT * FROM cable WHERE ownership NOT IN (SELECT id FROM owner WHERE status = 'Inactive')&lt;/P&gt;&lt;P&gt;But I know that's probably a long shot. Just being able to consider more than one table in a SELECT criteria would be fantastic.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Technically you can do it today. We do not have any UI that allows you to construct that kind of where clause with subqueries but you can simply switch to the SQL mode and write your sql in there.&lt;BR /&gt;&lt;BR /&gt;Here is a screenshot where I selected airports that has runways (in a separate table) longer than or equal to 10,000 ft.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TanuHoque_0-1648836013529.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/37980i1297C56BA46F2607/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TanuHoque_0-1648836013529.png" alt="TanuHoque_0-1648836013529.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Of course, you use do the same in the Definition Query page to filter them out instead of selecting them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are two version of the sql I'm providing here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;-- option#1
exists (select 1 from AIRPORT_RUNWAYS r where r.LENGTH &amp;gt;= 10000 and AIRPORT_FACILITY.FKOBJECTID = r.FKOBJECTID)

-- option#2
FKOBJECTID in (select FKOBJECTID from AIRPORT_RUNWAYS r where r.LENGTH &amp;gt;= 10000)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 18:05:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160374#M19224</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2022-04-01T18:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160442#M19225</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425494"&gt;@MarcusVowell_Uniti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;said above, you can also use query layer if you want.&lt;/P&gt;&lt;P&gt;Query layer can have parameters too. And that is how you can update values in a where clause without re-create (or updating the source of) the query layer. See screenshots below.&lt;/P&gt;&lt;P&gt;As you know these queries can be very complex.&lt;/P&gt;&lt;P&gt;Here is the help on query layer parameters.&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/define-parameters-in-a-query-layer.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/define-parameters-in-a-query-layer.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TanuHoque_0-1648845874811.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/37997iE1A42D23481C1FC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TanuHoque_0-1648845874811.png" alt="TanuHoque_0-1648845874811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TanuHoque_1-1648845880451.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/37998iAEC3DEC8CFEA1CDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TanuHoque_1-1648845880451.png" alt="TanuHoque_1-1648845880451.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 20:46:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160442#M19225</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2022-04-01T20:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Grant ability to select based on related tables (inner join, outer join)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160812#M19234</link>
      <description>&lt;P&gt;I find that SQL statements for the use case can blow up on you when row counts are in the hundreds of thousands, for example leveraging the output of Generate Near Table.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 15:53:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/grant-ability-to-select-based-on-related-tables/idc-p/1160812#M19234</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2022-04-04T15:53:04Z</dc:date>
    </item>
  </channel>
</rss>

