<?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: SQL Query to identify duplicates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317425#M1536438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this something you need to do via code or can you use an analysis tool?  TAANA &amp;amp; TAANA_AV allow you to analyze distribution spreads by table fields (you can pick your table and the fields).  It's primarily used for archiving analysis but it's helpfuul in other scenarios as well.  It's not optimal for finding single record dupes but I thought I'd throw it out there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Sep 2010 18:42:36 GMT</pubDate>
    <dc:creator>brad_bohn</dc:creator>
    <dc:date>2010-09-23T18:42:36Z</dc:date>
    <item>
      <title>SQL Query to identify duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317423#M1536436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to identify and display some duplicate data from the database.&lt;/P&gt;&lt;P&gt;With duplicates I mean rows in a table that contain identical information in a combination of fields (Last Name, First Name, City).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID1     ID2     Last Name First Name  City               Phone&lt;/P&gt;&lt;P&gt;1005  2010    Krieger      Jeff             San Ramon     9252997100&lt;/P&gt;&lt;P&gt;1012  2010    Krieger      Jeff             San Ramon     9252997100&lt;/P&gt;&lt;P&gt;1017  2010    Krieger      Jeff             San Ramon     9252997100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to select the IDs (ID1 and ID2) that identify each duplicate rows. &lt;/P&gt;&lt;P&gt;Therefore I want to create a query with a subquery inside, similar to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ID1 ID2 LastName FirstName&lt;/P&gt;&lt;P&gt;   FROM Customers&lt;/P&gt;&lt;P&gt;   INTO TABLE &lt;/P&gt;&lt;P&gt;   WHERE (LastName FirstName City) IN&lt;/P&gt;&lt;P&gt;   (SELECT LastName FirstName City&lt;/P&gt;&lt;P&gt;       FROM Customers&lt;/P&gt;&lt;P&gt;       GROUP BY LastName FirstName City&lt;/P&gt;&lt;P&gt;       HAVING COUNT(*) &amp;gt; 1)&lt;/P&gt;&lt;P&gt;   ORDER BY LastName FirstName.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;How would be the syntax in ABAP, because I am not able to define more than one field after WHERE?&lt;/P&gt;&lt;P&gt;Any Ideas how to identify the duplicate data and return the ids?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 17:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317423#M1536436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-23T17:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to identify duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317424#M1536437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you will have to write individual WHERE's for each condition and splice them together with ANDs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I originall ysaid OR but meant AND&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Sep 23, 2010 1:40 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 17:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317424#M1536437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-23T17:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to identify duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317425#M1536438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this something you need to do via code or can you use an analysis tool?  TAANA &amp;amp; TAANA_AV allow you to analyze distribution spreads by table fields (you can pick your table and the fields).  It's primarily used for archiving analysis but it's helpfuul in other scenarios as well.  It's not optimal for finding single record dupes but I thought I'd throw it out there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 18:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-to-identify-duplicates/m-p/7317425#M1536438</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2010-09-23T18:42:36Z</dc:date>
    </item>
  </channel>
</rss>

