<?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: Pulling unique identifiers in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140573#M37584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want to combine two datasets and then delete records that have an id with more than one occurrence?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;delete from have&lt;/P&gt;&lt;P&gt;where id in (select id from have group by id having count(*)&amp;gt;1);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Sep 2014 13:31:38 GMT</pubDate>
    <dc:creator>DBailey</dc:creator>
    <dc:date>2014-09-11T13:31:38Z</dc:date>
    <item>
      <title>Pulling unique identifiers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140572#M37583</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;Is there a way for me to pull all values in a column that are unique?&amp;nbsp; I combined two monthly datasets and some of the primary keys are unique when combined, not all of them though.&amp;nbsp; Is there a way to pull just the unique primary keys without using PROC SQL?&amp;nbsp; I dropped some of the variables so I can't use PROC SQL according to the log.&amp;nbsp; Also, I tried using PROC SORT and the NODUPKEY.&amp;nbsp; I forgot that it keeps one set of the duplicate records but I want to get rid of both sets of the duplicate records.&amp;nbsp; Let me know of any suggestions!&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 13:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140572#M37583</guid>
      <dc:creator>RobertHuey</dc:creator>
      <dc:date>2014-09-11T13:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling unique identifiers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140573#M37584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want to combine two datasets and then delete records that have an id with more than one occurrence?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;delete from have&lt;/P&gt;&lt;P&gt;where id in (select id from have group by id having count(*)&amp;gt;1);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 13:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140573#M37584</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2014-09-11T13:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling unique identifiers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140574#M37585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data unique;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;if first.id and last.id ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and why can't use sql ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from have group by id having count(*)=1&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 13:33:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Pulling-unique-identifiers/m-p/140574#M37585</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-09-11T13:33:49Z</dc:date>
    </item>
  </channel>
</rss>

