<?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: ArcGIS Select Query help in Standards and Interoperability Questions</title>
    <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241327#M119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, dropping the second wildcard will end up missing cases where A1 is not at the end of the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2018 13:46:48 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2018-05-31T13:46:48Z</dc:date>
    <item>
      <title>ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241325#M117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In one of my field I have got records showing attribute&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) A1,F4,A10&lt;/P&gt;&lt;P&gt;2) A1,A17&lt;/P&gt;&lt;P&gt;3) F1,G6, A1&lt;/P&gt;&lt;P&gt;4) A10, A1&lt;/P&gt;&lt;P&gt;6)&amp;nbsp;D1, A17&lt;/P&gt;&lt;P&gt;7)&amp;nbsp;D2, D4&lt;/P&gt;&lt;P&gt;and so on I am trying to select records showing A1 valueI have&amp;nbsp;tried using query&amp;nbsp;&amp;nbsp;Field1 LIKE '%A1%' it is also selecting A10. Is there any way I can select only value A1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 03:28:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241325#M117</guid>
      <dc:creator>AnuSawant</dc:creator>
      <dc:date>2018-05-31T03:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241326#M118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;drop the 2nd %&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;Field1 LIKE '%A1'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 04:08:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241326#M118</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-31T04:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241327#M119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, dropping the second wildcard will end up missing cases where A1 is not at the end of the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 13:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241327#M119</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-05-31T13:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241328#M120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is why lists are not considered best-practice in database design.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you had a second table organized:&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" height="385" style="border: 1px solid #c6c6c6;" width="250"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH style="width: 113.5px;"&gt;keycol&lt;/TH&gt;&lt;TH style="width: 113.5px;"&gt;attrval&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;1&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;1&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;F4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;1&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;2&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;2&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;3&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;F1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;3&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;G6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;3&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;4&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 113.5px;"&gt;4&lt;/TD&gt;&lt;TD style="width: 113.5px;"&gt;A1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you could fashion a query:&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;SELECT * &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;FROM mytable &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WHERE keycol in (&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT keycol &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; FROM secondtab &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp; WHERE attrval = 'A1')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 14:00:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241328#M120</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2018-05-31T14:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241329#M121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Vince already pointed out, your data design doesn't fit well within the relational model, which makes storing and querying it in a relational data store kludgy.&amp;nbsp; That said, it is not uncommon to see this kind of data design, and most relational data stores and the SQL standard itself have made some accommodations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to use SQL LIKE to accomplish your matching will result in a long list of LIKE and OR statements.&amp;nbsp; Depending on your backend data store, you can use expanded pattern matching through LIKE or SIMILAR.&amp;nbsp; The not-so-good news is that expanded pattern matching is very implementation/product specific, so portability suffers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working with file geodatabases, see if the following works:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;-- SIMILAR TO syntax here only works correctly in &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;-- ArcGIS Desktop 10.6 or greater and ArcGIS Pro 2.0 or greater&lt;/SPAN&gt;
field_name SIMILAR &lt;SPAN class="keyword token"&gt;TO&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'(A1[ ,]%|%[ ,]A1[ ,]%|%[ ,]A1)'&lt;/SPAN&gt;‍‍‍‍&amp;nbsp; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking closely at your data, the matching is made more difficult by inconsistent use of spaces.&amp;nbsp; For some records, there is a space after a comma but not all the time.&amp;nbsp; My SQL above assumes there may or may not be a single space or comma before or after the value you are searching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The comparable SQL to my above using basic pattern matching with LIKE is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'A1,%'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'A1 %'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'% A1 %'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'% A1,%'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'%,A1 %'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'%,A1,%'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'% A1'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;OR&lt;/SPAN&gt;
field_name &lt;SPAN class="operator token"&gt;LIKE&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'%,A1'&lt;/SPAN&gt;‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL code using LIKE is very portable, but as you can see, you shouldn't expect much for performance when you chaining together so many condition checks using OR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:06:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241329#M121</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T12:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241330#M122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhhh he didn't indicate that possibility &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;Just going with the KISS principle first&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 15:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241330#M122</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-05-31T15:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Select Query help</title>
      <link>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241331#M123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately this is third party data and I have to process it without doing any changes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 23:17:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/standards-and-interoperability-questions/arcgis-select-query-help/m-p/241331#M123</guid>
      <dc:creator>AnuSawant</dc:creator>
      <dc:date>2018-06-04T23:17:08Z</dc:date>
    </item>
  </channel>
</rss>

