<?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: FGDB database view — Join fields missing from attribute table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/fgdb-database-view-join-fields-missing-from/m-p/1372235#M77657</link>
    <description>&lt;P&gt;Instead of using SELECT * for both tables at the same time, use a SELECT * for each table separately:&lt;/P&gt;&lt;PRE&gt;select
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.*,&lt;/STRONG&gt;&lt;/FONT&gt;
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;l.*&lt;/STRONG&gt;&lt;/FONT&gt;
from
    species_records &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/FONT&gt;
left outer join
    (select
        t_species,
        max(t_date) as t_date 
    from
        species_records 
    group by
        t_species) &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;l&lt;/STRONG&gt;&lt;/FONT&gt;
    on s.t_species = l.t_species 
       and s.t_date = l.t_date&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1705674359413.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92185i5099A13800F8DAF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_2-1705674359413.png" alt="Bud_2-1705674359413.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That seems to force the attribute table to use the table alias from the query as a prefix, making the field names unique in the attribute table.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2024 14:30:17 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-01-19T14:30:17Z</dc:date>
    <item>
      <title>FGDB database view — Join fields missing from attribute table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/fgdb-database-view-join-fields-missing-from/m-p/1372234#M77656</link>
      <description>&lt;P&gt;ArcGIS Pro 3.2.1; file geodatabase&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Background:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is a SQL query for creating a database view called species_records_latest_vw:&lt;/P&gt;&lt;PRE&gt;select
    *
from
    species_records
left outer join
    (select
        t_species,
        max(t_date) as t_date 
    from
        species_records 
    group by
        t_species) l
    on species_records.t_species = l.t_species 
       and species_records.t_date = l.t_date&lt;/PRE&gt;&lt;P&gt;&lt;U&gt;Oracle 18c 10.7.1 EGDB:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;If I try to create a view using the above SQL in Oracle, I'll get an error due to joined/duplicate column names. I won't be able to create the view. That's expected.&lt;/P&gt;&lt;PRE&gt;ORA-00957: duplicate column name&lt;/PRE&gt;&lt;P&gt;&lt;U&gt;Mobile Geodatabase&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I can create a view using the&amp;nbsp;SQL in a Mobile Geodatabase without errors. The joined/duplicate columns are included in the attribute table. The duplicate fields are suffixed with ":1", making them unique. That's a valid way of handling the duplicate fields.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1705674089438.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92183i40946BCDA1348029/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1705674089438.png" alt="Bud_0-1705674089438.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;File Geodatabase&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I can create a view using the SQL in a File Geodatabase without errors. However, the joined/duplicate columns have been &lt;STRONG&gt;excluded&lt;/STRONG&gt;&amp;nbsp;from the attribute table. That's not expected.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1705674089443.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92182iDDBD0DFD3925F63C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_1-1705674089443.png" alt="Bud_1-1705674089443.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;03528630 - ArcGIS Pro 3.2.1: FGDB database view has joined fields with duplicate names; joined fields should not be excluded from attribute table&lt;/P&gt;&lt;P&gt;BUG-000164420: Database View created in file geodatabase with Join definition does not create the required duplicate fields&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The FGDB view should either behave like the Oracle view (throw an error) or behave like the Mobile GDB view (include the fields). But it doesn't do either of those things. It excludes the joined fields which defeats the purpose of the join and the view.&lt;/P&gt;&lt;P&gt;Are there any workarounds for this issue?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 14:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/fgdb-database-view-join-fields-missing-from/m-p/1372234#M77656</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-19T14:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: FGDB database view — Join fields missing from attribute table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/fgdb-database-view-join-fields-missing-from/m-p/1372235#M77657</link>
      <description>&lt;P&gt;Instead of using SELECT * for both tables at the same time, use a SELECT * for each table separately:&lt;/P&gt;&lt;PRE&gt;select
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s.*,&lt;/STRONG&gt;&lt;/FONT&gt;
    &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;l.*&lt;/STRONG&gt;&lt;/FONT&gt;
from
    species_records &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/FONT&gt;
left outer join
    (select
        t_species,
        max(t_date) as t_date 
    from
        species_records 
    group by
        t_species) &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;l&lt;/STRONG&gt;&lt;/FONT&gt;
    on s.t_species = l.t_species 
       and s.t_date = l.t_date&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1705674359413.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92185i5099A13800F8DAF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_2-1705674359413.png" alt="Bud_2-1705674359413.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That seems to force the attribute table to use the table alias from the query as a prefix, making the field names unique in the attribute table.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 14:30:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/fgdb-database-view-join-fields-missing-from/m-p/1372235#M77657</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-19T14:30:17Z</dc:date>
    </item>
  </channel>
</rss>

