<?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: How to delete some observations in some groups based on a condition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713428#M220099</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I would like delete some observations in some groups based on a condition. My condition is each group : if (imput="toto") then delete but if a whole group has imput="toto" then keep it&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jan 2021 17:38:02 GMT</pubDate>
    <dc:creator>ddotta</dc:creator>
    <dc:date>2021-01-22T17:38:02Z</dc:date>
    <item>
      <title>How to delete some observations in some groups based on a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713422#M220096</link>
      <description>&lt;PRE class="lang-sql s-code-block hljs"&gt;&lt;CODE&gt;data temp;
input siren $ class $ imput $;
cards;
A CP titi
B CP toto
C CE tata
D CE tata
F CM toto
G CM toto
H SU tata
I SU toto
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output I want :&lt;/P&gt;&lt;PRE class="lang-sql s-code-block hljs"&gt;&lt;CODE&gt;siren class imput
A CP titi
C CE tata
D CE tata
F CM toto
G CM toto
H SU tata&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Many thanks in advance !&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 17:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713422#M220096</guid>
      <dc:creator>ddotta</dc:creator>
      <dc:date>2021-01-22T17:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete some observations in some groups based on a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713423#M220097</link>
      <description>&lt;P&gt;Please state the condition rules.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can make that output but it probably would not work for any other records.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 17:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713423#M220097</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-22T17:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete some observations in some groups based on a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713427#M220098</link>
      <description>&lt;A href="https://stackoverflow.com/questions/65848148/how-to-delete-some-rows-within-a-group-in-sas" target="_blank"&gt;https://stackoverflow.com/questions/65848148/how-to-delete-some-rows-within-a-group-in-sas&lt;/A&gt;</description>
      <pubDate>Fri, 22 Jan 2021 17:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713427#M220098</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-22T17:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete some observations in some groups based on a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713428#M220099</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like delete some observations in some groups based on a condition. My condition is each group : if (imput="toto") then delete but if a whole group has imput="toto" then keep it&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 17:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713428#M220099</guid>
      <dc:creator>ddotta</dc:creator>
      <dc:date>2021-01-22T17:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete some observations in some groups based on a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713429#M220100</link>
      <description>not the same question</description>
      <pubDate>Fri, 22 Jan 2021 17:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713429#M220100</guid>
      <dc:creator>ddotta</dc:creator>
      <dc:date>2021-01-22T17:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete some observations in some groups based on a condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713468#M220118</link>
      <description>&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select a.*&lt;BR /&gt;from temp as a left join (select *,count(imput) as cnt from temp where imput='toto' group by class ) as b on (a.class=b.class &amp;amp; a.siren=b.siren)&lt;BR /&gt;having missing(b.cnt) or b.cnt&amp;gt;=2&lt;BR /&gt;order by a.siren,a.class; &lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 19:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-some-observations-in-some-groups-based-on-a/m-p/713468#M220118</guid>
      <dc:creator>sam369</dc:creator>
      <dc:date>2021-01-22T19:52:56Z</dc:date>
    </item>
  </channel>
</rss>

