<?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 AGOL can't access table data in SQL View with PIVOT in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/agol-can-t-access-table-data-in-sql-view-with/m-p/1008166#M37661</link>
    <description>&lt;P&gt;I have created two SQL Views (non-spatial) in Catalog (v10.8), published them via Pro (2.6.3) as a service, and added them to AGOL as items via their REST endpoints, specifying to store the credentials with the items. The first View, which uses a GROUP By function works fine in AGOL.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second View, which uses a PIVOT function gives me a "Data Error" when trying to view Data in AGOL and a "Cannot access data" error in Dashboard.&amp;nbsp; This PIVOTED view works fine in Pro and I can query the REST endpoint successfully.&lt;/P&gt;&lt;P&gt;View SQL is shown below.&amp;nbsp; Thoughts on why this won't work in AGOL?&lt;/P&gt;&lt;P&gt;-------------------------------------------&lt;/P&gt;&lt;P&gt;SELECT cast((ROW_NUMBER() over (order by RACE asc)) as int) as OBJECTID, RACE, GENDER, [SUICIDE],[NATURAL CAUSES],[NARCOTICS RELATED],[EXCITED DELIRIUM],[HOMICIDE]&lt;BR /&gt;FROM&lt;BR /&gt;(SELECT GENDER, RACE, CAUSE_OF_DEATH&lt;BR /&gt;FROM xxxxxx.DEATHSSINCE2000) as SourceTable&lt;/P&gt;&lt;P&gt;PIVOT&lt;BR /&gt;(&lt;BR /&gt;COUNT(CAUSE_OF_DEATH)&lt;BR /&gt;FOR CAUSE_OF_DEATH IN ([SUICIDE],[NATURAL CAUSES],[NARCOTICS RELATED],[EXCITED DELIRIUM],[HOMICIDE])&lt;BR /&gt;) AS PivotTable&lt;/P&gt;&lt;P&gt;---------------------------------------------------&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2020 18:07:08 GMT</pubDate>
    <dc:creator>JayJohnsonWashoeCounty</dc:creator>
    <dc:date>2020-12-09T18:07:08Z</dc:date>
    <item>
      <title>AGOL can't access table data in SQL View with PIVOT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-can-t-access-table-data-in-sql-view-with/m-p/1008166#M37661</link>
      <description>&lt;P&gt;I have created two SQL Views (non-spatial) in Catalog (v10.8), published them via Pro (2.6.3) as a service, and added them to AGOL as items via their REST endpoints, specifying to store the credentials with the items. The first View, which uses a GROUP By function works fine in AGOL.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second View, which uses a PIVOT function gives me a "Data Error" when trying to view Data in AGOL and a "Cannot access data" error in Dashboard.&amp;nbsp; This PIVOTED view works fine in Pro and I can query the REST endpoint successfully.&lt;/P&gt;&lt;P&gt;View SQL is shown below.&amp;nbsp; Thoughts on why this won't work in AGOL?&lt;/P&gt;&lt;P&gt;-------------------------------------------&lt;/P&gt;&lt;P&gt;SELECT cast((ROW_NUMBER() over (order by RACE asc)) as int) as OBJECTID, RACE, GENDER, [SUICIDE],[NATURAL CAUSES],[NARCOTICS RELATED],[EXCITED DELIRIUM],[HOMICIDE]&lt;BR /&gt;FROM&lt;BR /&gt;(SELECT GENDER, RACE, CAUSE_OF_DEATH&lt;BR /&gt;FROM xxxxxx.DEATHSSINCE2000) as SourceTable&lt;/P&gt;&lt;P&gt;PIVOT&lt;BR /&gt;(&lt;BR /&gt;COUNT(CAUSE_OF_DEATH)&lt;BR /&gt;FOR CAUSE_OF_DEATH IN ([SUICIDE],[NATURAL CAUSES],[NARCOTICS RELATED],[EXCITED DELIRIUM],[HOMICIDE])&lt;BR /&gt;) AS PivotTable&lt;/P&gt;&lt;P&gt;---------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 18:07:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-can-t-access-table-data-in-sql-view-with/m-p/1008166#M37661</guid>
      <dc:creator>JayJohnsonWashoeCounty</dc:creator>
      <dc:date>2020-12-09T18:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL can't access table data in SQL View with PIVOT</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-can-t-access-table-data-in-sql-view-with/m-p/1008169#M37662</link>
      <description>&lt;P&gt;Adding some mentions to likely-looking ESRI staff:&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/98956"&gt;@ChristianWells&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;mention removed at user request&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 20:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-can-t-access-table-data-in-sql-view-with/m-p/1008169#M37662</guid>
      <dc:creator>JayJohnsonWashoeCounty</dc:creator>
      <dc:date>2020-12-10T20:46:43Z</dc:date>
    </item>
  </channel>
</rss>

