<?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: Delete data that does not meet a condition in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515004#M73225</link>
    <description>&lt;P&gt;You can filter your data relatively easy via PROC SQL. &lt;BR /&gt;&lt;BR /&gt;It would be as a simple as &lt;BR /&gt;&lt;BR /&gt;Proc sql;&lt;BR /&gt;Create table filtered as&lt;BR /&gt;Select * from returns &lt;BR /&gt;Where firm in (select distinct firm from dividend);&lt;BR /&gt;Quit. &lt;BR /&gt;&lt;BR /&gt;You would have to replace the table and variable names as appropriate.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/247082"&gt;@starkey09&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;I have a large dataset in excel to sort for firms stock data. On one sheet I have returns, sheet 2 has market cap, sheet 3 has dividend yield. Because not all companies pay dividends, I need to delete firms that are not included on the dividend yield sheet. Is there a procedure I can run in sas that will only count firm data that is included in all dataset sheets?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Nov 2018 04:20:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-11-22T04:20:57Z</dc:date>
    <item>
      <title>Delete data that does not meet a condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/514987#M73222</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a large dataset in excel to sort for firms stock data. On one sheet I have returns, sheet 2 has market cap, sheet 3 has dividend yield. Because not all companies pay dividends, I need to delete firms that are not included on the dividend yield sheet. Is there a procedure I can run in sas that will only count firm data that is included in all dataset sheets?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 05:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/514987#M73222</guid>
      <dc:creator>starkey09</dc:creator>
      <dc:date>2018-11-21T05:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data that does not meet a condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515004#M73225</link>
      <description>&lt;P&gt;You can filter your data relatively easy via PROC SQL. &lt;BR /&gt;&lt;BR /&gt;It would be as a simple as &lt;BR /&gt;&lt;BR /&gt;Proc sql;&lt;BR /&gt;Create table filtered as&lt;BR /&gt;Select * from returns &lt;BR /&gt;Where firm in (select distinct firm from dividend);&lt;BR /&gt;Quit. &lt;BR /&gt;&lt;BR /&gt;You would have to replace the table and variable names as appropriate.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/247082"&gt;@starkey09&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;I have a large dataset in excel to sort for firms stock data. On one sheet I have returns, sheet 2 has market cap, sheet 3 has dividend yield. Because not all companies pay dividends, I need to delete firms that are not included on the dividend yield sheet. Is there a procedure I can run in sas that will only count firm data that is included in all dataset sheets?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 04:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515004#M73225</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-22T04:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data that does not meet a condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515273#M73236</link>
      <description>&lt;P&gt;Thanks. That works to filter the names. However, the data that is attributed to each of those firm names is missing. The result gave me just a list of the names on the data set. I have attached a photo- perhaps I made an error?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DIV.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25123i34115C8E18F31BB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="DIV.PNG" alt="DIV.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TRNZX.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25124i3B3CA88895F220E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="TRNZX.PNG" alt="TRNZX.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Filtered.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25122i45CFBAEFE281EE18/image-size/large?v=v2&amp;amp;px=999" role="button" title="Filtered.PNG" alt="Filtered.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 03:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515273#M73236</guid>
      <dc:creator>starkey09</dc:creator>
      <dc:date>2018-11-22T03:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data that does not meet a condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515281#M73237</link>
      <description>&lt;P&gt;Your code doesn't match mine. I have select * which means select everything and you have select name, which selects only the name variable. Please post your code and results as texts, trying to read code off images is not fun.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/247082"&gt;@starkey09&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks. That works to filter the names. However, the data that is attributed to each of those firm names is missing. The result gave me just a list of the names on the data set. I have attached a photo- perhaps I made an error?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DIV.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25123i34115C8E18F31BB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="DIV.PNG" alt="DIV.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TRNZX.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25124i3B3CA88895F220E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="TRNZX.PNG" alt="TRNZX.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Filtered.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25122i45CFBAEFE281EE18/image-size/large?v=v2&amp;amp;px=999" role="button" title="Filtered.PNG" alt="Filtered.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 04:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515281#M73237</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-22T04:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data that does not meet a condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515912#M73252</link>
      <description>&lt;P&gt;Thank you very much. That has worked perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 08:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Delete-data-that-does-not-meet-a-condition/m-p/515912#M73252</guid>
      <dc:creator>starkey09</dc:creator>
      <dc:date>2018-11-26T08:08:21Z</dc:date>
    </item>
  </channel>
</rss>

