<?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: Remove record on the same date but different types(BIG, SMALL)but add SMALL to prev record in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493428#M129801</link>
    <description>It is not duplicate, I just used the same dataset. But I want an indication before removing the record indicating two different type being mentioned(BIG&amp;amp;SMALL)</description>
    <pubDate>Fri, 07 Sep 2018 13:51:42 GMT</pubDate>
    <dc:creator>Vk_2</dc:creator>
    <dc:date>2018-09-07T13:51:42Z</dc:date>
    <item>
      <title>Remove record on the same date but different types(BIG, SMALL)but add SMALL to prev record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493240#M129727</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA table1;
infile datalines DELIMITER=','; 
INFORMAT id 2. type $10. date date2 MMDDYY10. ; 

 INPUT id  date type date2;

format date date9.
       date2 date9.;
DATALINES;
1,02/09/2012,BIG,02/09/2012
2,05/16/2012,BIG,05/18/2012
2,06/18/2012,BIG,06/18/2012
2,06/18/2012,SMALL,	
3,08/08/2011,BIG,08/08/2012
3,09/13/2011,BIG,09/13/2012
4,06/08/2016,BIG,06/12/2016
4,06/10/2016,SMALL,	
5,08/16/2012,BIG,08/16/2012
5,08/15/2012,SMALL,	
;
run;

/*removing same date for an id with different type- only the record with SMALL is REMOVED*/
proc sql;
create table comb as
Select id, date, type,date2 from table1 t
Where type &amp;lt;&amp;gt; "SMALL" or 
not exists(select date from table1 
where id = t.id and date = t.date and type &amp;lt;&amp;gt; "SMALL");
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This gives:&lt;/P&gt;&lt;P&gt;id date type date2&lt;BR /&gt;1 09FEB2012 BIG 09FEB2012&lt;BR /&gt;2 16MAY2012 BIG 18MAY2012&lt;BR /&gt;2 18JUN2012 BIG 18JUN2012&lt;BR /&gt;3 08AUG2011 BIG 08AUG2012&lt;BR /&gt;3 13SEP2011 BIG 13SEP2012&lt;BR /&gt;4 08JUN2016 BIG 12JUN2016&lt;BR /&gt;4 10JUN2016 SMALL .&lt;BR /&gt;5 15AUG2012 SMALL .&lt;BR /&gt;5 16AUG2012 BIG 16AUG2012&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this removed the record that I want (2 06/18/2012 SMALL )but I want a field name cat for the same date and id to include BIG &amp;amp; SMALL&lt;/P&gt;&lt;P&gt;like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;id date type date2 cat&lt;BR /&gt;1 09FEB2012 BIG 09FEB2012&lt;BR /&gt;2 16MAY2012 BIG 18MAY2012&lt;BR /&gt;2 18JUN2012 BIG 18JUN2012 BIG &amp;amp; SMALL&lt;BR /&gt;3 08AUG2011 BIG 08AUG2012&lt;BR /&gt;3 13SEP2011 BIG 13SEP2012&lt;BR /&gt;4 08JUN2016 BIG 12JUN2016&lt;BR /&gt;4 10JUN2016 SMALL .&lt;BR /&gt;5 15AUG2012 SMALL .&lt;BR /&gt;5 16AUG2012 BIG 16AUG2012&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 01:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493240#M129727</guid>
      <dc:creator>Vk_2</dc:creator>
      <dc:date>2018-09-07T01:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Remove record on the same date but different types(BIG, SMALL)but add SMALL to prev record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493250#M129731</link>
      <description>&lt;P&gt;Mark as spam to remove &lt;A href="https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493240" target="_self"&gt;duplicate&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 03:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493250#M129731</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-09-07T03:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Remove record on the same date but different types(BIG, SMALL)but add SMALL to prev record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493428#M129801</link>
      <description>It is not duplicate, I just used the same dataset. But I want an indication before removing the record indicating two different type being mentioned(BIG&amp;amp;SMALL)</description>
      <pubDate>Fri, 07 Sep 2018 13:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-record-on-the-same-date-but-different-types-BIG-SMALL-but/m-p/493428#M129801</guid>
      <dc:creator>Vk_2</dc:creator>
      <dc:date>2018-09-07T13:51:42Z</dc:date>
    </item>
  </channel>
</rss>

