<?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: Difference Between 2 Data sets in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579173#M13409</link>
    <description>&lt;P&gt;proc sort data=a;by common_surveyid;&lt;/P&gt;&lt;P&gt;proc sort data=b;by common_surveyid;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a_b;merge a(in=a) b(in=b);&lt;/P&gt;&lt;P&gt;by common_surveyid;&lt;/P&gt;&lt;P&gt;if a and not b;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2019 16:25:31 GMT</pubDate>
    <dc:creator>Zad</dc:creator>
    <dc:date>2019-08-05T16:25:31Z</dc:date>
    <item>
      <title>Difference Between 2 Data sets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579171#M13408</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two data sets. Data set A has 1,000 observations and data set B (subset of data set A) with 800 observations. I want to make a data set C that ONLY has the other 200 observations from data set A.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure there is some easy code for this but I just don't know what it is. Please help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 16:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579171#M13408</guid>
      <dc:creator>suzannep</dc:creator>
      <dc:date>2019-08-05T16:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Difference Between 2 Data sets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579173#M13409</link>
      <description>&lt;P&gt;proc sort data=a;by common_surveyid;&lt;/P&gt;&lt;P&gt;proc sort data=b;by common_surveyid;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a_b;merge a(in=a) b(in=b);&lt;/P&gt;&lt;P&gt;by common_surveyid;&lt;/P&gt;&lt;P&gt;if a and not b;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 16:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579173#M13409</guid>
      <dc:creator>Zad</dc:creator>
      <dc:date>2019-08-05T16:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Difference Between 2 Data sets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579196#M13410</link>
      <description>&lt;P&gt;While your code will provide the intended results, it looks horrible.&lt;/P&gt;
&lt;P&gt;Compare this;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=a;
by common_surveyid;
run;

proc sort data=b;
by common_surveyid;
run;
 
data a_b;
merge
  a (in=a)
  b (in=b)
;
by common_surveyid;
if a and not b;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and tell me, which one is easier to read and understand for another coder?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 17:55:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579196#M13410</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-05T17:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Difference Between 2 Data sets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579198#M13411</link>
      <description>&lt;P&gt;You can also do it in SQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select a.*
from a
where key not in (
  select b.key from b
);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Aug 2019 17:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579198#M13411</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-05T17:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difference Between 2 Data sets</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579217#M13416</link>
      <description>&lt;P&gt;Or possibly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc Sql;
   create table want as
   select * from tableA
   except
   select * from tableb
  ;
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Aug 2019 19:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Difference-Between-2-Data-sets/m-p/579217#M13416</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-05T19:39:31Z</dc:date>
    </item>
  </channel>
</rss>

