<?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 with View_Scale Parameter using Oracle Data? in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789093#M2019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it working - not by altering the query, but by creating the query in two steps. First I created the query layer without the 'where' clause. Then I went in to the query layer properties and edited the query by adding the 'where' clause. The data then displays as expected, with the Local table displaying at scales below 10000 and Regional data above scales of 10000.&amp;nbsp;Not sure why the query wouldn't build in a single step though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2019 11:00:22 GMT</pubDate>
    <dc:creator>FinnianO_Connor</dc:creator>
    <dc:date>2019-09-05T11:00:22Z</dc:date>
    <item>
      <title>Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789089#M2015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the blog, '&lt;A href="https://www.esri.com/arcgis-blog/products/mapping/mapping/scale-dependent-multiple-datasources-for-a-single-feature-layer_multi-level-geography/"&gt;Scale dependent multiple datasources for a single feature layer&lt;/A&gt;', I am trying to create a query layer using the view_scale parameter to switch between different tables based on map scale. The data I am&amp;nbsp;querying is stored in an Oracle database and the sql I am using for the query layer is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SELECT * FROM (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SELECT 1 as t_id, OBJECTID, Geometry FROM Local&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;UNION ALL&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SELECT 2 as t_id, OBJECTID, Geometry FROM Regional) x&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WHERE x.t_id = CASE WHEN ::view_scale &amp;gt; 10000 THEN 2 ELSE 1 END&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query validates with no errors, but after selecting 'finish' in the New Query Layer dialog no layer is added to the map in ArcGIS Pro. If I remove the WHERE clause, the data loads as expected, however both feature classes load at all scales which is not desired.&lt;/P&gt;&lt;P&gt;Wondering have I an issue with the syntax of the query or are there other potential causes to the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Finnian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789089#M2015</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2019-09-04T13:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789090#M2016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should the "x" after "FROM REGIONAL" be inside the ")" and not outside?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:33:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789090#M2016</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2019-09-04T14:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789091#M2017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply George. If i more the 'x' inside that bracket I get a validation error with the 'where' clause, which I guess makes sense as the alias&amp;nbsp;'x' is now referring to the Regional table as opposed to the entire inner select query&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 14:50:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789091#M2017</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2019-09-04T14:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789092#M2018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try it with our the alias and use the table name for "x"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot remember if ArcGIS query layers work (or like) the alias's at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2019 15:00:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789092#M2018</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2019-09-04T15:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789093#M2019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it working - not by altering the query, but by creating the query in two steps. First I created the query layer without the 'where' clause. Then I went in to the query layer properties and edited the query by adding the 'where' clause. The data then displays as expected, with the Local table displaying at scales below 10000 and Regional data above scales of 10000.&amp;nbsp;Not sure why the query wouldn't build in a single step though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 11:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789093#M2019</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2019-09-05T11:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789094#M2020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finnian:&lt;/P&gt;&lt;P&gt;Is your Oracle database registered with SDE?&amp;nbsp; Or is the Oracle database just spatially enabled with SDE libraries that you needed to install onto the database?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Sep 2019 14:50:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789094#M2020</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2019-09-08T14:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query Layer with View_Scale Parameter using Oracle Data?</title>
      <link>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789095#M2021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this particular case I'm working directly with the Oracle data (sdo geometry) from ArcGIS Pro so no connection is being made through Enterprise/Server etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2019 07:31:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/query-layer-with-view-scale-parameter-using-oracle/m-p/789095#M2021</guid>
      <dc:creator>FinnianO_Connor</dc:creator>
      <dc:date>2019-09-10T07:31:28Z</dc:date>
    </item>
  </channel>
</rss>

