<?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 filter out subset in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491071#M31663</link>
    <description>Thanks for your recommendation. As I am new to the communities, good to&lt;BR /&gt;receive some positive feedback. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Table 1 Table 2&lt;BR /&gt;Apple Apple&lt;BR /&gt;Pear Melon&lt;BR /&gt;Orange&lt;BR /&gt;Melon&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 30 Aug 2018 04:12:31 GMT</pubDate>
    <dc:creator>miss2223</dc:creator>
    <dc:date>2018-08-30T04:12:31Z</dc:date>
    <item>
      <title>How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491051#M31658</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two data set below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 211px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22865i22EE9877D79DE7CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i get a result only showing Orange, Melon on the list.&lt;/P&gt;&lt;P&gt;I would to filter out common factors of Apple and Melon on the new list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 02:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491051#M31658</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2018-08-30T02:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491052#M31659</link>
      <description>&lt;PRE class="xis-code"&gt;proc sql;
  
   select * from table1
   except
   select * from table2;&lt;/PRE&gt;
&lt;P&gt;assuming I understand your requirement&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 02:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491052#M31659</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-30T02:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491057#M31660</link>
      <description>Thanks for quick response.&lt;BR /&gt;&lt;BR /&gt;It caused error message "180-322: Statement is not valid or it is used out&lt;BR /&gt;of proper order." which is underlined statement of except&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Aug 2018 03:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491057#M31660</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2018-08-30T03:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491065#M31661</link>
      <description>&lt;P&gt;Please post the sample of your datasets as plain text rather than pics and also post the output sample you want. Would be convenient if you could provide a good representative sample&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 03:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491065#M31661</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-30T03:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491071#M31663</link>
      <description>Thanks for your recommendation. As I am new to the communities, good to&lt;BR /&gt;receive some positive feedback. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Table 1 Table 2&lt;BR /&gt;Apple Apple&lt;BR /&gt;Pear Melon&lt;BR /&gt;Orange&lt;BR /&gt;Melon&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Aug 2018 04:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491071#M31663</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2018-08-30T04:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491072#M31664</link>
      <description>&lt;P&gt;should i assume&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data table1;&lt;/P&gt;
&lt;P&gt;input var $10.;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;apple&lt;/P&gt;
&lt;P&gt;pear&lt;/P&gt;
&lt;P&gt;orange&amp;nbsp;&lt;/P&gt;
&lt;P&gt;melon&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data table2;&lt;/P&gt;
&lt;P&gt;input var $10.;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;apple&lt;/P&gt;
&lt;P&gt;&amp;nbsp;melon&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;and your required output is&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;input var $10.;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;pear&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;orange&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 04:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491072#M31664</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-30T04:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491118#M31665</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/229416"&gt;@miss2223&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for quick response.&lt;BR /&gt;&lt;BR /&gt;It caused error message "180-322: Statement is not valid or it is used out&lt;BR /&gt;of proper order." which is underlined statement of except&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You alread got lesson #1 for successful questions from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt; (post example data in data steps with datalines)&lt;/P&gt;
&lt;P&gt;Lesson #2:&lt;/P&gt;
&lt;P&gt;When encountering an ERROR (or another message you do not understand), always post the &lt;EM&gt;whole&lt;/EM&gt; log of the failing step into a window opened with the {i} button. The message alone does not tell us much, its positioning in relation to the code (and the code itself, of course) is important. Since the main posting window scrambles the formatting (by removing blanks), using the {i} is mandatory.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 07:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491118#M31665</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-30T07:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491409#M31682</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/229416"&gt;@miss2223&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for quick response.&lt;BR /&gt;&lt;BR /&gt;It caused error message "180-322: Statement is not valid or it is used out&lt;BR /&gt;of proper order." which is underlined statement of except&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Sounds like you may have a ; at the end of the first part of:&amp;nbsp; select * from table &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;If so remove it. SQL script bits use one ; to end the whole statement which can have many parts.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491409#M31682</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-30T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491423#M31683</link>
      <description>&lt;P&gt;Yes require&amp;nbsp;output to appear "pear and orange in the list"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input var $10.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;pear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;orange&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:45:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491423#M31683</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2018-08-30T20:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491426#M31684</link>
      <description>&lt;P&gt;Test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data table1;

input var $10.;

cards;
apple
pear
orange 
melon
;

 

data table2;

input var $10.;

cards;
apple
 melon
;


proc sql;
  create table want as
   select * from table1
   except
   select * from table2;
   quit;

proc print nobs;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;RESULTS:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAS Output&lt;/STRONG&gt;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.WANT" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l header" scope="col"&gt;var&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;orange&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;pear&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491426#M31684</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-30T20:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out subset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491434#M31685</link>
      <description>Got it! thanks for your patience&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-filter-out-subset/m-p/491434#M31685</guid>
      <dc:creator>miss2223</dc:creator>
      <dc:date>2018-08-30T21:15:31Z</dc:date>
    </item>
  </channel>
</rss>

