<?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: Removal of duplicates at transactional level in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177513#M3557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does it work on SAS 9.2 version&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Jan 2015 19:47:49 GMT</pubDate>
    <dc:creator>venkatnaveen</dc:creator>
    <dc:date>2015-01-10T19:47:49Z</dc:date>
    <item>
      <title>Removal of duplicates at transactional level</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177510#M3554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; data a; &lt;BR /&gt; input remove_dt ac_no reason$ cl_tid; &lt;BR /&gt; informat remove_dt ddmmyy8.; &lt;BR /&gt; format remove_dt ddmmyy8.; &lt;BR /&gt; cards; &lt;BR /&gt; 1/4/2014 1111 A 222 &lt;BR /&gt; 1/4/2014 1111 A 222 &lt;BR /&gt; 1/4/2014 1111 T 222&amp;nbsp; &lt;BR /&gt; 2/5/2014 5555 B 666 &lt;BR /&gt; 4/5/2014 4444 C 222 &lt;BR /&gt; 2/5/2014 5555 D 666 &lt;BR /&gt; 1/4/2014 1111 R 333 &lt;BR /&gt; 2/5/2014 5555 B 666 &lt;BR /&gt; 2/5/2014 5555 B 666 &lt;BR /&gt; 2/5/2014 5555 G 666 &lt;BR /&gt; ;&amp;nbsp; &lt;BR /&gt; run;&amp;nbsp; &lt;/P&gt;&lt;P&gt; 1.) Out of the above dataset named a, i want all the duplicate records with duplicate remove_dt, ac_no, reason and cl_tid at transaction level..&lt;BR /&gt; So the ouput should be-&lt;BR /&gt;&amp;nbsp; remove_dt ac_no reason cl_tid &lt;BR /&gt; 1/4/2014 1111 A 222&amp;nbsp; &lt;BR /&gt; 1/4/2014 1111 A 222 &lt;BR /&gt; 2/5/2014 5555 B 666&lt;BR /&gt; 2/5/2014 5555 B 666&lt;BR /&gt; 2/5/2014 5555 B 666&lt;/P&gt;&lt;P&gt; 2.) Out of the dataset named a, i want the duplicate records with remove_dt, ac_no, cl_tid&lt;BR /&gt; So the output should be-&lt;/P&gt;&lt;P&gt; remove_dt ac_no reason cl_tid &lt;BR /&gt; 1/4/2014 1111 A 222&amp;nbsp; &lt;BR /&gt; 1/4/2014 1111 A 222 &lt;BR /&gt; 1/4/2014 1111 T 222&lt;BR /&gt; 2/5/2014 5555 B 666&lt;BR /&gt; 2/5/2014 5555 D 666&lt;BR /&gt; 2/5/2014 5555 B 666&amp;nbsp; &lt;BR /&gt; 2/5/2014 5555 B 666 &lt;BR /&gt; 2/5/2014 5555 G 666&amp;nbsp; &lt;/P&gt;&lt;P&gt; Now, out of the above dataset, i want a cross tab of accounts by cl_tid and reason!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2015 18:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177510#M3554</guid>
      <dc:creator>venkatnaveen</dc:creator>
      <dc:date>2015-01-10T18:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removal of duplicates at transactional level</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177511#M3555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you want to keep records with multiple occurrences rather than remove duplicates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at proc sort with variants on the NOUNIQUEKEY option. You may want to consider the order of your BY variables, my guess is that ac_no should be first. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=have out=want nouniquekey;&lt;/P&gt;&lt;P&gt;by ac_no remove_dt cl_tid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2015 19:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177511#M3555</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-10T19:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Removal of duplicates at transactional level</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177512#M3556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, Your question is not quite clear or my understanding is poor. I can only agree with Reeza on looking at your data. Can you explain to Reeza's point &lt;EM&gt;"It looks like you want to keep records with multiple occurrences rather than remove duplicates?" .&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2015 19:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177512#M3556</guid>
      <dc:creator>naveen_srini</dc:creator>
      <dc:date>2015-01-10T19:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Removal of duplicates at transactional level</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177513#M3557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does it work on SAS 9.2 version&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2015 19:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177513#M3557</guid>
      <dc:creator>venkatnaveen</dc:creator>
      <dc:date>2015-01-10T19:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Removal of duplicates at transactional level</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177514#M3558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, only SAS 9.3+.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead you'll need to use first/last logic. I've changed my mind about the order of the by statements as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming sort:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=have; by ac_no cl_tid remove_dt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;by ac_no cl_tid remove_dt;&lt;/P&gt;&lt;P&gt;if not (first.remove_dt and last.remove_dt);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Jan 2015 21:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Removal-of-duplicates-at-transactional-level/m-p/177514#M3558</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-10T21:48:39Z</dc:date>
    </item>
  </channel>
</rss>

