<?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: Query Layer comes up empty in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170709#M54757</link>
    <description>&lt;P&gt;What are the chances? Someone just posted a question that got me thinking about the JOIN. I read somewhere that OUTER JOIN is the same as JOIN. So, I took out the OUTER and it worked! Yay!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select T.OBJECTID,FC.Shape,FC.FacilityId,FC.TransformerType,FC.UnitCount,FC.Project,FC.MapId,T.Phase,T.Voltage, CAST(FLOOR(T.kvaRating) AS varchar) AS Label from ForestGrove.GIS.eTransformerBank_evw AS FC LEFT JOIN ForestGrove.GIS.eTransformerUnit_evw AS T ON FC.FacilityId=T.TransformerBankId&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2022 17:08:48 GMT</pubDate>
    <dc:creator>Jen_Zumbado-Hannibal</dc:creator>
    <dc:date>2022-05-04T17:08:48Z</dc:date>
    <item>
      <title>Query Layer comes up empty</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170708#M54756</link>
      <description>&lt;P&gt;Dear community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having difficulty figuring out why this SQL query is coming up empty when creating a 'Query Layer.'&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two layers in the electrical network on SDE. Database on MSSQL 19 and using ArcPro 2.9.2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Relationship: one eTransformerBank [Field Name: &lt;STRONG&gt;FacilityId&lt;/STRONG&gt;, Alias:&lt;STRONG&gt;Transformer ID&lt;/STRONG&gt;, (Data Type: &lt;STRONG&gt;&lt;EM&gt;Long&lt;/EM&gt;&lt;/STRONG&gt;)] has many eTransformerUnit [Field Name: &lt;STRONG&gt;FacilityId&lt;/STRONG&gt;, Alias: &lt;STRONG&gt;Facility Identifier&lt;/STRONG&gt;, (Data Type: &lt;STRONG&gt;&lt;EM&gt;Text&lt;/EM&gt;&lt;/STRONG&gt;)].&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jen_ZumbadoHannibal_1-1651682673795.png" style="width: 425px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40564i5C849AB733C7B4C6/image-dimensions/425x103?v=v2" width="425" height="103" role="button" title="Jen_ZumbadoHannibal_1-1651682673795.png" alt="Jen_ZumbadoHannibal_1-1651682673795.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jen_ZumbadoHannibal_2-1651682948424.png" style="width: 422px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40566i68956A94B9F35A77/image-dimensions/422x105?v=v2" width="422" height="105" role="button" title="Jen_ZumbadoHannibal_2-1651682948424.png" alt="Jen_ZumbadoHannibal_2-1651682948424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select T.OBJECTID,FC.Shape,FC.FacilityId,FC.TransformerType,FC.UnitCount,FC.Project,FC.MapId,T.Phase,T.Voltage, CAST(FLOOR(T.kvaRating) AS varchar) AS Label from ForestGrove.GIS.eTransformerBank_evw AS FC LEFT OUTER JOIN ForestGrove.GIS.eTransformerUnit_evw AS T ON FC.FacilityId=T.TransformerBankId&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The query is validated, and I choose FacilityID as a unique identifier to set the spatial properties of the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, once I do this, I get a table with no data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 18:33:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170708#M54756</guid>
      <dc:creator>Jen_Zumbado-Hannibal</dc:creator>
      <dc:date>2022-05-04T18:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer comes up empty</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170709#M54757</link>
      <description>&lt;P&gt;What are the chances? Someone just posted a question that got me thinking about the JOIN. I read somewhere that OUTER JOIN is the same as JOIN. So, I took out the OUTER and it worked! Yay!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select T.OBJECTID,FC.Shape,FC.FacilityId,FC.TransformerType,FC.UnitCount,FC.Project,FC.MapId,T.Phase,T.Voltage, CAST(FLOOR(T.kvaRating) AS varchar) AS Label from ForestGrove.GIS.eTransformerBank_evw AS FC LEFT JOIN ForestGrove.GIS.eTransformerUnit_evw AS T ON FC.FacilityId=T.TransformerBankId&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 17:08:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170709#M54757</guid>
      <dc:creator>Jen_Zumbado-Hannibal</dc:creator>
      <dc:date>2022-05-04T17:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer comes up empty</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170761#M54764</link>
      <description>&lt;P&gt;UPDATE:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also wanted to show up the Bank FacilityID and the Unit FacilityID in the same table. So, I changed the query to:&lt;/P&gt;&lt;P&gt;select T.OBJECTID,FC.Shape,FC.FacilityId,&lt;U&gt;T.FacilityId AS UnitFacID&lt;/U&gt;,FC.TransformerType,FC.UnitCount,FC.Project,FC.MapId,T.Phase,T.Voltage, T.kvaRating from ForestGrove.GIS.eTransformerBank_evw AS FC LEFT JOIN ForestGrove.GIS.eTransformerUnit_evw AS T ON FC.FacilityId=T.TransformerBankId&lt;/P&gt;&lt;P&gt;I'm not very good with SQL. But I understood what the query was doing. Since both tables have FacilityID, the outcome of the query layer couldn't have attributes with the same name even when displaying different data. So, I had to give it a label different than FacilityID (Bank) to make it work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 18:33:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-layer-comes-up-empty/m-p/1170761#M54764</guid>
      <dc:creator>Jen_Zumbado-Hannibal</dc:creator>
      <dc:date>2022-05-04T18:33:21Z</dc:date>
    </item>
  </channel>
</rss>

