<?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: Exclude a row from dataset in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673823#M202774</link>
    <description>Thanks!</description>
    <pubDate>Fri, 31 Jul 2020 19:48:43 GMT</pubDate>
    <dc:creator>Daisy2</dc:creator>
    <dc:date>2020-07-31T19:48:43Z</dc:date>
    <item>
      <title>Exclude a row from dataset in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673808#M202768</link>
      <description>&lt;P&gt;Can you exclude a row in a dataset in SAS?&amp;nbsp; I know you can do it in JMP but can't find anything about it in SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the only option is to delete, how do I delete a row with specific variables?&amp;nbsp; For example, the two rows I want to delete have the following categorical variables.&amp;nbsp; This combination of variables makes those rows unique.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Row 1: Loc = A, Hyb=X03, Ntrt = High, Density = Low&lt;/P&gt;&lt;P&gt;Row 2: Loc = B, Hyb = X04, Ntrt = Low, Density = Low&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 18:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673808#M202768</guid>
      <dc:creator>Daisy2</dc:creator>
      <dc:date>2020-07-31T18:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a row from dataset in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673811#M202770</link>
      <description>&lt;P&gt;Something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data want ;
 set have ;
 if loc="A" and Hyb="X03" and Ntrt="High" and Density="Low" then delete ;
 if loc="B" and Hyb="X04" and Ntrt="High" and Density="Low" then delete ;
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jul 2020 18:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673811#M202770</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2020-07-31T18:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a row from dataset in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673812#M202771</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    delete from my_dataset
    where (Loc = 'A' and Hyb = 'X03' and Ntrt = 'High' and Density = 'Low')
       or (Loc = 'B' and Hyb = 'X04' and Ntrt = 'Low' and Density = 'Low');
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, if you just want to &lt;EM&gt;exclude&lt;/EM&gt; those rows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
    create table want as
    select *
    from my_dataset
    where not (Loc = 'A' and Hyb = 'X03' and Ntrt = 'High' and Density = 'Low')
       and not (Loc = 'B' and Hyb = 'X04' and Ntrt = 'Low' and Density = 'Low');
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 19:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673812#M202771</guid>
      <dc:creator>mklangley</dc:creator>
      <dc:date>2020-07-31T19:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a row from dataset in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673823#M202774</link>
      <description>Thanks!</description>
      <pubDate>Fri, 31 Jul 2020 19:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-row-from-dataset-in-SAS/m-p/673823#M202774</guid>
      <dc:creator>Daisy2</dc:creator>
      <dc:date>2020-07-31T19:48:43Z</dc:date>
    </item>
  </channel>
</rss>

