<?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: Comments in SQL expressions — Single-line comment at and of statement causes error in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1377714#M78288</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;for mobile geodatabase don't put semicolon but try to put only this kind of comment at the end of line or at new line: /*pippo*/&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yeah, I think I already mentioned that technique in the original post.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2024 18:44:46 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-02-02T18:44:46Z</dc:date>
    <item>
      <title>Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1255537#M65169</link>
      <description>&lt;P&gt;ArcGIS Pro 3.0.3; mobile geodatabase:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I want to put SQL comments in definition query SQL expressions. From my testing, these kinds of comments seem to work as expected:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Works:&lt;/STRONG&gt; Multi-line SQL comments at the beginning or end of the SQL expression:&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#0000FF"&gt;/*multi-line sql comment*/&lt;/FONT&gt;&lt;BR /&gt;OBJECTID IN (3, 5, 11)&lt;/PRE&gt;&lt;PRE&gt;OBJECTID IN (3, 5, 11)&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;/*multi-line sql comment*/&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Works:&lt;/STRONG&gt; Single-line SQL comments at the &lt;U&gt;&lt;EM&gt;beginning&lt;/EM&gt;&lt;/U&gt; of the SQL expression:&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#0000FF"&gt;--single-line sql comment&lt;/FONT&gt;&lt;BR /&gt;OBJECTID IN (3, 5, 11)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Doesn't work:&lt;/STRONG&gt; Single-line SQL comments at the &lt;U&gt;&lt;EM&gt;end&lt;/EM&gt;&lt;/U&gt;&amp;nbsp;of the SQL expression:&lt;/P&gt;&lt;PRE&gt;OBJECTID IN (3, 5, 11)&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;--single-line sql comment&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Error: The SQL expression has invalid syntax.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1675723063921.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62214i310E65B3B2AE93E9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1675723063921.png" alt="Bud_0-1675723063921.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why don't single-line comments work at the end of SQL expressions in ArcGIS Pro? Is that a bug?&lt;/P&gt;&lt;P&gt;I don't have that issue when creating full-blown SELECT queries in database views, query layers, or SQL Developer queries. I only seem to have that problem with ArcGIS Pro SQL expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Note: There is a bug in ArcGIS Pro 3.0.3 that can be a nuisance:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/modifying-existing-sql-expression-disables/m-p/1255524" target="_self"&gt;Modifying existing SQL expression disables definition query&lt;/A&gt;. So when testing things like the comments/SQL above, we need to re-enable definition queries after modifying the SQL.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 02:13:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1255537#M65169</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-02-08T02:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1262640#M66034</link>
      <description>&lt;P&gt;Esri Canada Case 03268522 - Comments in SQL expressions - Single-line comment at and of statement causes error&lt;/P&gt;&lt;P&gt;ENH-000156157 - ArcGIS Pro - Add a line break automatically to the end of any definition query SQL expression applied to a mobile geodatabase feature class to avoid the error "The SQL expression has invalid syntax." when a SQL single-line comment that is not terminated by a line break is inserted at the end of the expression.&lt;/P&gt;&lt;P&gt;ENH-000156184 -&amp;nbsp;ArcGIS Pro - Change the error message displayed when a SQL single-line comment that is not terminated with a line break and that doesn't include a space is inserted at the end of a definition query SQL expression applied to a mobile geodatabase feature class from "Fields do not match." to "The SQL expression has invalid syntax.".&lt;/P&gt;&lt;P&gt;ENH-000156189 -&amp;nbsp;ArcGIS Pro - Add documentation that outlines how to add single-line and multi-line comments to a definition query SQL expression applied to a mobile geodatabase feature class.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 18:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1262640#M66034</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-02-28T18:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1375840#M78059</link>
      <description>&lt;P&gt;Hi Bud,&lt;/P&gt;&lt;P&gt;you have to complete the sql string with ";" then write your comment like these examples:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_0-1706606545809.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93164i967FEEBCE6AEAC00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_0-1706606545809.png" alt="gpgisandsky_0-1706606545809.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_1-1706606604304.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93165iF88738638413AC53/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_1-1706606604304.png" alt="gpgisandsky_1-1706606604304.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It's works on Pro 3.1.4. thank you&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 09:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1375840#M78059</guid>
      <dc:creator>gpgisandsky</dc:creator>
      <dc:date>2024-01-30T09:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1375936#M78067</link>
      <description>&lt;P&gt;Given that a semicolon has been the &amp;lt;SQL terminator&amp;gt; since the first SQL standard, and syntax rules have called for using a &amp;lt;SQL terminator&amp;gt; since the first SQL standard; this is definitely the correct answer.&amp;nbsp; In fact, I think addressing some of the logged defects and enhancements would make the situation worse rather than better.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 15:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1375936#M78067</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-01-30T15:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1375954#M78068</link>
      <description>&lt;P&gt;Regarding a single-line comment at the end of the SQL:&lt;/P&gt;&lt;P&gt;I tried using a semicolon in ArcGIS Pro 3.2.1 and a mobile geodatabase. But I couldn't get it working.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Video:&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6345881018112w898h470r277" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6345881018112" 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-6345881018112w898h470r277');  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/6345881018112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;The test in the video uses Select By Attributes. But, I see the same issue when doing a similar test in a definition query.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I also have the issue when using an Oracle 18c table in Pro 3.2.1 (unversioned).&lt;/P&gt;&lt;P&gt;Video:&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6345879941112w898h470r57" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6345879941112" 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-6345879941112w898h470r57');  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/6345879941112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I having a brainfart?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 16:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1375954#M78068</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-30T16:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1376057#M78075</link>
      <description>&lt;P&gt;Hi Bud,&lt;/P&gt;&lt;P&gt;maybe:&lt;/P&gt;&lt;P&gt;a) definition query&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) query filter&lt;/P&gt;&lt;P&gt;c) select by attribute&lt;/P&gt;&lt;P&gt;call the SQL in different way.&amp;nbsp;&lt;SPAN&gt;The semicolon how &amp;lt;SQL terminator&amp;gt; and the comment and end of line (---pluto) or at a new line (/*paperino*/) works fine into a) and b) but in c) only&amp;nbsp;&amp;lt;SQL terminator&amp;gt; is the cause of the error (I tested it on ArcGIS Pro 3.1.x with file geodatabase). The behavior you described could be related to how ArcGIS Pro processes SQL internally. May I ask you why you want put the comment into a temporarly query like select by attribute?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 19:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1376057#M78075</guid>
      <dc:creator>gpgisandsky</dc:creator>
      <dc:date>2024-01-30T19:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1376103#M78083</link>
      <description>&lt;P&gt;Definition queries are the main use case. I just happened to test in Select By Attributes because I thought it would behave the same way.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I couldn't get a semicolon to work in a definition query in ArcGIS Pro 3.2.1 / mobile geodatabase:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1706645516102.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93223i054CADAF0E95C9BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1706645516102.png" alt="Bud_0-1706645516102.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;There was an error with the expression.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you mean by "query filter"?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:14:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1376103#M78083</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-30T20:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1376125#M78087</link>
      <description>&lt;P&gt;Hi Bud, for mobile geodatabase don't put semicolon but try to put only this kind of comment at the end of line or at new line: /*pippo*/ likes :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_0-1706646326193.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93224iDE98FDA09C3A0A58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_0-1706646326193.png" alt="gpgisandsky_0-1706646326193.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_1-1706646424017.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93226i9BC40AF0ED9545A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_1-1706646424017.png" alt="gpgisandsky_1-1706646424017.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;it's works on my ArcGIS 3.1.x and mobile geodatabse. This confirm that ArcGIS work in different way on different format (file, personal gdb ...) too.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;About&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;"What do you mean by "query filter"?" I would say query filter in "display filter"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gpgisandsky_2-1706646611040.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/93227iEEB4949D59BD9D1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gpgisandsky_2-1706646611040.png" alt="gpgisandsky_2-1706646611040.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;have a good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1376125#M78087</guid>
      <dc:creator>gpgisandsky</dc:creator>
      <dc:date>2024-01-30T20:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comments in SQL expressions — Single-line comment at and of statement causes error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1377714#M78288</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;for mobile geodatabase don't put semicolon but try to put only this kind of comment at the end of line or at new line: /*pippo*/&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yeah, I think I already mentioned that technique in the original post.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 18:44:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/comments-in-sql-expressions-single-line-comment-at/m-p/1377714#M78288</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-02-02T18:44:46Z</dc:date>
    </item>
  </channel>
</rss>

