<?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 Duplicate Query within Multiple Attributes in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/duplicate-query-within-multiple-attributes/m-p/544699#M30907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I’ve got a SQL query problem I was hoping someone might have a solution for.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m querying my table&amp;nbsp;(COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass) for duplicate X and Y coordinates. The coordinates reside in different attribute columns named X and Y respectively (i know it's original). To accomplish this query I am currently using the statement supplied by the tech article &lt;A class="link-titled" href="http://support.esri.com/technical-article/000006708" title="http://support.esri.com/technical-article/000006708"&gt;How To: Query for duplicate records in a feature class table&lt;/A&gt;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;X In (SELECT X FROM COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass GROUP BY X HAVING Count(*)&amp;gt;1 ) AND&lt;/P&gt;&lt;P&gt;Y In (SELECT Y FROM COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass GROUP BY Y HAVING Count(*)&amp;gt;1 )&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This works very well when querying one attribute column, but I am noticing that it fails when combining the two statements using AND. Is this because it looks for duplicates in X AND then duplicates in Y? And not for only duplicate combinations of X and Y?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/216830_XY_Columns.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was suggested that I group X and Y together using this statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;X,Y in (SELECT X,Y FROM COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass GROUP BY X,Y HAVING Count(*)&amp;gt;1 )&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but I'm getting the error of "An expression of non-boolean type specified in context where a condition is expected, near ",". The same occurs when I group X and Y as 'X,Y', and I assume this is because X and Y are both Field Type: Double?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2016 14:49:05 GMT</pubDate>
    <dc:creator>ErickWiggs2</dc:creator>
    <dc:date>2016-08-18T14:49:05Z</dc:date>
    <item>
      <title>Duplicate Query within Multiple Attributes</title>
      <link>https://community.esri.com/t5/data-management-questions/duplicate-query-within-multiple-attributes/m-p/544699#M30907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;I’ve got a SQL query problem I was hoping someone might have a solution for.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m querying my table&amp;nbsp;(COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass) for duplicate X and Y coordinates. The coordinates reside in different attribute columns named X and Y respectively (i know it's original). To accomplish this query I am currently using the statement supplied by the tech article &lt;A class="link-titled" href="http://support.esri.com/technical-article/000006708" title="http://support.esri.com/technical-article/000006708"&gt;How To: Query for duplicate records in a feature class table&lt;/A&gt;&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;X In (SELECT X FROM COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass GROUP BY X HAVING Count(*)&amp;gt;1 ) AND&lt;/P&gt;&lt;P&gt;Y In (SELECT Y FROM COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass GROUP BY Y HAVING Count(*)&amp;gt;1 )&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This works very well when querying one attribute column, but I am noticing that it fails when combining the two statements using AND. Is this because it looks for duplicates in X AND then duplicates in Y? And not for only duplicate combinations of X and Y?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/216830_XY_Columns.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was suggested that I group X and Y together using this statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;X,Y in (SELECT X,Y FROM COM_GDB.GISADMIN.COM_CRM_MasterFeatureClass GROUP BY X,Y HAVING Count(*)&amp;gt;1 )&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but I'm getting the error of "An expression of non-boolean type specified in context where a condition is expected, near ",". The same occurs when I group X and Y as 'X,Y', and I assume this is because X and Y are both Field Type: Double?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2016 14:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/duplicate-query-within-multiple-attributes/m-p/544699#M30907</guid>
      <dc:creator>ErickWiggs2</dc:creator>
      <dc:date>2016-08-18T14:49:05Z</dc:date>
    </item>
  </channel>
</rss>

