<?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: Modifying existing SQL expression disables definition query in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/modifying-existing-sql-expression-disables/m-p/1256254#M65243</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;DIV&gt;Esri Canada Case #03259723 - ArcGIS Pro: Modifying existing definition query disables the query&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Esri inc confirmed that this issue is related to the previous bug [&lt;SPAN&gt;BUG-000155660]&lt;/SPAN&gt; so we do not need to make a new one.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 08 Feb 2023 20:06:08 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2023-02-08T20:06:08Z</dc:date>
    <item>
      <title>Modifying existing SQL expression disables definition query</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/modifying-existing-sql-expression-disables/m-p/1255524#M65167</link>
      <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.0.3; mobile geodatabase:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Using a standalone table like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1675719384325.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62208iD800CC0C54C26C4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bud_0-1675719384325.png" alt="Bud_0-1675719384325.png" /&gt;&lt;/span&gt;.&lt;/P&gt;&lt;PRE&gt;ASSET_ID    DATE_           CONDITION
--------    ----------      ---------
1           2016-04-01      1
1           2019-03-01      2
1           2022-01-01      3
2           2016-04-01      4
2           2022-01-01      5
3           2022-01-01      6
3           2022-03-01      7
3           2018-03-01      8
3           2013-03-01      9
3           2010-06-01      10
3           2022-03-01      11
3           2022-03-01      11&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And using a &lt;STRONG&gt;non-expression builder&lt;/STRONG&gt; definition query like this:&lt;/P&gt;&lt;PRE&gt;--sql comment&lt;BR /&gt;OBJECTID IN (3, 5, 11)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_1-1675719450307.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62209i2633AAE191549E46/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_1-1675719450307.png" alt="Bud_1-1675719450307.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;...or like this:&lt;/P&gt;&lt;PRE&gt;objectid IN (
     SELECT objectid
       FROM roadinsptable r2
      WHERE r2.asset_id = roadinsptable.asset_id
   ORDER BY date_ DESC, condition DESC
      LIMIT 1
            )&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_2-1675719516683.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62210i98CBED07FD4E5551/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_2-1675719516683.png" alt="Bud_2-1675719516683.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both of those definition queries work as-is and are active.&lt;/P&gt;&lt;P&gt;But after creating those definition queries, if I were to modify the SQL by doing something like add a few spaces to the end, or change a 1 to a 2, then the definition query would get disabled.&lt;/P&gt;&lt;P&gt;For example, if I were to change&lt;/P&gt;&lt;PRE&gt;--sql comment&lt;BR /&gt;OBJECTID IN (3, 5, 11)&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;--sql comment&lt;BR /&gt;OBJECTID IN (3, 5, &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/FONT&gt;)&lt;/PRE&gt;&lt;P&gt;then that would disable the definition query. That's not the expected result.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here's a video example of adding spaces to the end of an SQL expression:&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6319896457112w778h540r543" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6319896457112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6319896457112w778h540r543');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6319896457112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;Is that a known issue?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/make-definition-query-s-toggle-more-intuitive/idi-p/1239988" target="_self"&gt;Make definition query's toggle more intuitive&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 20:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/modifying-existing-sql-expression-disables/m-p/1255524#M65167</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-02-08T20:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying existing SQL expression disables definition query</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/modifying-existing-sql-expression-disables/m-p/1256254#M65243</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;DIV&gt;Esri Canada Case #03259723 - ArcGIS Pro: Modifying existing definition query disables the query&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Esri inc confirmed that this issue is related to the previous bug [&lt;SPAN&gt;BUG-000155660]&lt;/SPAN&gt; so we do not need to make a new one.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 08 Feb 2023 20:06:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/modifying-existing-sql-expression-disables/m-p/1256254#M65243</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-02-08T20:06:08Z</dc:date>
    </item>
  </channel>
</rss>

