<?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: Where Statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758555#M239531</link>
    <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jul 2021 22:19:52 GMT</pubDate>
    <dc:creator>sassypixie</dc:creator>
    <dc:date>2021-07-30T22:19:52Z</dc:date>
    <item>
      <title>Where Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758551#M239527</link>
      <description>&lt;P&gt;I want to create a where statement where the variable is equal to 1,3 , or 4 but I am having trouble getting the output I want. I've tried a few methods but I'll just post the last one I tried. Basically I am trying to get the where statement to exclude 2 and only include 1, 3 and 4. Any suggestions? Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Proc means data=data;&lt;BR /&gt;var chol;&lt;BR /&gt;class sex;&lt;BR /&gt;where (2&amp;gt;race&amp;gt;2);&lt;BR /&gt; run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 22:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758551#M239527</guid>
      <dc:creator>sassypixie</dc:creator>
      <dc:date>2021-07-30T22:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Where Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758553#M239529</link>
      <description>&lt;P&gt;And "where" (put intended) did you learn the expression&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;where (2&amp;gt;race&amp;gt;2);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;SAS will interpret this to mean the RACE is BOTH greater than 2 and less than 2.&amp;nbsp; In other words, it insert an "and" not an "or".&amp;nbsp; (Thus expressions like&amp;nbsp; 1&amp;lt;race&amp;lt;3 function as actual subseting filters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try:&lt;/P&gt;
&lt;PRE&gt;where (race ^= 2);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 22:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758553#M239529</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-07-30T22:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Where Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758555#M239531</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 22:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758555#M239531</guid>
      <dc:creator>sassypixie</dc:creator>
      <dc:date>2021-07-30T22:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Where Statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758622#M239568</link>
      <description>&lt;P&gt;Alternate&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Where race in (1 3 4);&lt;/PRE&gt;
&lt;P&gt;if you know an explicit list of values that you want to keep. Some times the list to keep is shorter than a list to exclude so it is good to know multiple ways to filter values.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 22:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Where-Statement/m-p/758622#M239568</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-31T22:52:36Z</dc:date>
    </item>
  </channel>
</rss>

