<?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 Delete from tables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604450#M17062</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table where i want to keep only three years of data.&lt;/P&gt;
&lt;P&gt;what i want to do is to delete from the table where (DT_OPER : keep three years).&lt;/P&gt;
&lt;P&gt;DT_OPER is of type date like 2019/10/01.&lt;/P&gt;
&lt;P&gt;can you help please.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2019 13:19:07 GMT</pubDate>
    <dc:creator>aloou</dc:creator>
    <dc:date>2019-11-15T13:19:07Z</dc:date>
    <item>
      <title>Delete from tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604450#M17062</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table where i want to keep only three years of data.&lt;/P&gt;
&lt;P&gt;what i want to do is to delete from the table where (DT_OPER : keep three years).&lt;/P&gt;
&lt;P&gt;DT_OPER is of type date like 2019/10/01.&lt;/P&gt;
&lt;P&gt;can you help please.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 13:19:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604450#M17062</guid>
      <dc:creator>aloou</dc:creator>
      <dc:date>2019-11-15T13:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604451#M17063</link>
      <description>&lt;P&gt;Do something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    where DT_OPER &amp;gt;= intnx('year', today(), -3, 's');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Nov 2019 13:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604451#M17063</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-15T13:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete from tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604666#M17126</link>
      <description>&lt;P&gt;Also, to run an analysis only on those three years you don't need to create a new dataset. You can simply use a WHERE statement when running the procedure. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have;
where year(DT_OPER) in (2010, 2011, 2012);
var myVar;
....
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Nov 2019 05:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Delete-from-tables/m-p/604666#M17126</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-11-16T05:16:05Z</dc:date>
    </item>
  </channel>
</rss>

