<?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: Removing Observations and it's associated duplicate unique ID observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-Observations-and-it-s-associated-duplicate-unique-ID/m-p/645559#M193011</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input claim_id proc_cd $ value icd $;
cards;
3 23 34 G5601
3 J20 34 J2
3 J2234 34 G5602
3 J22340 34 G5603
2 123 34 G5603
2 12314 34 C
1 23 64 C
12 23 87 C
4 34 98 G5601
4 35 34 asd
5 35 34 G5602
;
run;

proc sql;
create table want as
select *
from have
where claim_id not in
(select distinct claim_id from have where proc_cd in ('23','34'));
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 May 2020 12:20:06 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-05-06T12:20:06Z</dc:date>
    <item>
      <title>Removing Observations and it's associated duplicate unique ID observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Observations-and-it-s-associated-duplicate-unique-ID/m-p/645558#M193010</link>
      <description>&lt;P&gt;Hi All, below is the data I have. I am trying to delete all rows of observations with proc_cd = 23 or proc_cd = 34. In addition, if a claim_id had a proc_cd = 23 or a proc_cd = 34, I also want to delete all the other rows associated with that claim_id. Below is the data "want". You see that only claim_id = 2 and claim_id = 5 are left since they never had a proc_cd = 23 or proc_cd = 34.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input claim_id proc_cd $ value icd $;&lt;BR /&gt;cards;&lt;BR /&gt;3 23 34 G5601&lt;BR /&gt;3 J20 34 J2&lt;BR /&gt;3 J2234 34 G5602&lt;BR /&gt;3 J22340 34 G5603&lt;BR /&gt;2 123 34 G5603&lt;BR /&gt;2 12314 34 C&lt;BR /&gt;1 23 64 C&lt;BR /&gt;12 23 87 C&lt;BR /&gt;4 34 98 G5601&lt;BR /&gt;4 35 34 asd&lt;BR /&gt;5 35 34 G5602&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;input claim_id proc_cd $ value icd $;&lt;BR /&gt;cards;&lt;BR /&gt;2 123 34 G5603&lt;BR /&gt;2 12314 34 C&lt;BR /&gt;5 35 34 G5602&lt;BR /&gt;;&lt;BR /&gt;run;&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>Wed, 06 May 2020 12:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Observations-and-it-s-associated-duplicate-unique-ID/m-p/645558#M193010</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-05-06T12:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Observations and it's associated duplicate unique ID observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-Observations-and-it-s-associated-duplicate-unique-ID/m-p/645559#M193011</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input claim_id proc_cd $ value icd $;
cards;
3 23 34 G5601
3 J20 34 J2
3 J2234 34 G5602
3 J22340 34 G5603
2 123 34 G5603
2 12314 34 C
1 23 64 C
12 23 87 C
4 34 98 G5601
4 35 34 asd
5 35 34 G5602
;
run;

proc sql;
create table want as
select *
from have
where claim_id not in
(select distinct claim_id from have where proc_cd in ('23','34'));
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2020 12:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-Observations-and-it-s-associated-duplicate-unique-ID/m-p/645559#M193011</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-05-06T12:20:06Z</dc:date>
    </item>
  </channel>
</rss>

