<?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 Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/where-statement/m-p/286831#M59529</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where year&amp;gt;=0 year&amp;lt;=5;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;These are actually 2 conditions; you need to use a logical operator to combine them so you get a valid boolean result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where year&amp;gt;=0 and year&amp;lt;=5;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS also allows this construct:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where 0 &amp;lt;= year &amp;lt;= 5;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 25 Jul 2016 11:45:11 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-07-25T11:45:11Z</dc:date>
    <item>
      <title>where statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement/m-p/286828#M59527</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;glm&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=sasuser.sasfile250716;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;where year&amp;gt;=0 year&amp;lt;=5;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;model&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; ROA = &lt;/FONT&gt;&lt;/FONT&gt;salesGro rdsales LTassets LNAssets cAPAXASS DIVASSETS **bleep**efound BETA&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;/&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;solution&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;I have a variable "year" which have the indicators 0-10.&amp;nbsp;I want to run a regression that will limit &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;the data to years&amp;nbsp;of two&amp;nbsp;groups: 0-5 and 6-10. &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;I used the statement where but got an ERROR&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;534 proc glm data=sasuser.sasfile250716;&lt;/P&gt;&lt;P&gt;535 where year&amp;gt;=0 year&amp;lt;=5;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;76&lt;/P&gt;&lt;P&gt;ERROR: Syntax error while parsing WHERE clause.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, AND, EQ, GE, GT,&lt;/P&gt;&lt;P&gt;LE, LT, NE, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;536 model ROA = salesGro rdsales LTassets LNAssets cAPAXASS DIVASSETS **bleep**efound BETA&lt;/P&gt;&lt;P&gt;537 /solution;&lt;/P&gt;&lt;P&gt;538 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did not find where I can use &lt;STRONG&gt;where statement&lt;/STRONG&gt; as a list&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2016 11:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement/m-p/286828#M59527</guid>
      <dc:creator>yael</dc:creator>
      <dc:date>2016-07-25T11:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: where statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement/m-p/286831#M59529</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where year&amp;gt;=0 year&amp;lt;=5;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;These are actually 2 conditions; you need to use a logical operator to combine them so you get a valid boolean result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where year&amp;gt;=0 and year&amp;lt;=5;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS also allows this construct:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where 0 &amp;lt;= year &amp;lt;= 5;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jul 2016 11:45:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement/m-p/286831#M59529</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-07-25T11:45:11Z</dc:date>
    </item>
  </channel>
</rss>

