<?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 Proc freq with where statement? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267511#M14095</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to run proc freq on a charachter variable with multiple where statement eg.plus additional criteria,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where var = "1" or&amp;nbsp;var = "2" or&amp;nbsp;var="3",&lt;/P&gt;&lt;P&gt;where var2 = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its not working? does not give errors but just a&lt;/P&gt;&lt;P&gt;NOTE: WHERE clause has been replaced.&lt;/P&gt;&lt;P&gt;any suggestions as to why this is not working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 01 May 2016 23:06:01 GMT</pubDate>
    <dc:creator>AZIQ1</dc:creator>
    <dc:date>2016-05-01T23:06:01Z</dc:date>
    <item>
      <title>Proc freq with where statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267511#M14095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to run proc freq on a charachter variable with multiple where statement eg.plus additional criteria,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where var = "1" or&amp;nbsp;var = "2" or&amp;nbsp;var="3",&lt;/P&gt;&lt;P&gt;where var2 = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its not working? does not give errors but just a&lt;/P&gt;&lt;P&gt;NOTE: WHERE clause has been replaced.&lt;/P&gt;&lt;P&gt;any suggestions as to why this is not working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2016 23:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267511#M14095</guid>
      <dc:creator>AZIQ1</dc:creator>
      <dc:date>2016-05-01T23:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq with where statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267514#M14096</link>
      <description>&lt;P&gt;The second WHERE statement is replacing the first. Instead of using two WHERE clauses, use a single statement.&amp;nbsp; I'm not sure if you want AND or OR, but try like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where (var = "1" or&amp;nbsp;var = "2" or&amp;nbsp;var="3") AND&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var2 = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2016 23:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267514#M14096</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-05-01T23:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq with where statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267515#M14097</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/23718"&gt;@AZIQ1﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you were thinking of the "NOTE: WHERE clause has been augmented."? This (comparably harmless) note occurs if a WHERE statement and a WHERE= dataset option are used in conjunction. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.class(where=(age&amp;gt;14));
where weight&amp;gt;100;
tables age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2016 23:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267515#M14097</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-05-01T23:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc freq with where statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267646#M14101</link>
      <description>&lt;P&gt;Additionally there are bits that can make your clauses shorter and perhaps easer to understand.&lt;/P&gt;
&lt;P&gt;One is use of the IN operator to check for a list of conditions on a single variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where Var in ('1' '2' '3') ;&lt;/P&gt;
&lt;P&gt;if the values are numeric you can use a range of values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where Var2 in (1 3 15:27); matches 1, 3 and everything from 15 to 27 inclusive.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 15:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-freq-with-where-statement/m-p/267646#M14101</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-02T15:30:13Z</dc:date>
    </item>
  </channel>
</rss>

