<?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: proc sort nodupkey left in a duplicate row in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-sort-nodupkey-left-in-a-duplicate-row/m-p/229146#M54366</link>
    <description>&lt;P&gt;Display the values of the BY variables for the suspect observations using $HEX format, I expect you will find they are different.&amp;nbsp; There is probably a character that is displayed as a space but is not, or you have a different number of leading spaces.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2015 15:31:41 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2015-10-08T15:31:41Z</dc:date>
    <item>
      <title>proc sort nodupkey left in a duplicate row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sort-nodupkey-left-in-a-duplicate-row/m-p/229144#M54365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset at the person level but with duplicate rows. It has ID and character variables A, B, and C. I wanted unique rows, so I ran this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort nodupkey data=have;&lt;/P&gt;&lt;P&gt;by ID char_A char_B char_C;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked without producing an error message, but when looking through the data I noticed that at least one duplicate row remained.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp; Char_A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Char_B &amp;nbsp; &amp;nbsp; &amp;nbsp;Char_C&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abc- d &amp;nbsp; &amp;nbsp; &amp;nbsp; def_g &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ghi&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; abc- d &amp;nbsp; &amp;nbsp; &amp;nbsp; def_g &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ghi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure why this row remained in the data, as it looks like most of the duplicate rows were correctly deleted. Is there a way to troubleshoot and figure out whether there's some minor difference between the character variables or some other reason that the duplicate row wasn't removed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&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>Thu, 08 Oct 2015 15:22:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sort-nodupkey-left-in-a-duplicate-row/m-p/229144#M54365</guid>
      <dc:creator>Walternate</dc:creator>
      <dc:date>2015-10-08T15:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc sort nodupkey left in a duplicate row</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sort-nodupkey-left-in-a-duplicate-row/m-p/229146#M54366</link>
      <description>&lt;P&gt;Display the values of the BY variables for the suspect observations using $HEX format, I expect you will find they are different.&amp;nbsp; There is probably a character that is displayed as a space but is not, or you have a different number of leading spaces.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2015 15:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sort-nodupkey-left-in-a-duplicate-row/m-p/229146#M54366</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-10-08T15:31:41Z</dc:date>
    </item>
  </channel>
</rss>

