<?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: Help with the Where clause proc print in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455238#M115140</link>
    <description>&lt;P&gt;Hi, I'm teaching myself SAS from Learning SAS by Example. It has answers to only the odd problems. Plus, it helps to learn the concept by going on here when I am truly unclear about something.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 15:09:16 GMT</pubDate>
    <dc:creator>ManitobaMoose</dc:creator>
    <dc:date>2018-04-18T15:09:16Z</dc:date>
    <item>
      <title>Help with the Where clause proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455023#M115052</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure why this would not work. Any suggestions? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Libname Review'/folders/myfolders/Review' ;
Libname Learn'/folders/myfolders/Learn' ;  
Libname myformat'/folders/myfolders/sasuser.v94' ; 
Options fmtsearch=(myformat) ;

Proc Print data=learn.sales noobs ; 
	where Region eq ('North' AND Quantity lt 160) 
	OR Customer eq "Pet's are Us" ; /* Double "" because Pet's*/
run ; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I am getting the following error:&lt;/P&gt;&lt;PRE&gt; 69         Proc Print data=learn.sales noobs ;
 70         where Region eq ('North' AND Quantity lt 160)
 71         OR Customer eq "Pet's are Us" ; /* Double "" because Pet's*/
 ERROR: WHERE clause operator requires compatible variables.
 72         run ;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 05:00:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455023#M115052</guid>
      <dc:creator>ManitobaMoose</dc:creator>
      <dc:date>2018-04-18T05:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help with the Where clause proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455024#M115053</link>
      <description>&lt;PRE&gt;('North' AND Quantity lt 160) &lt;/PRE&gt;
&lt;P&gt;is a test. It returns a boolean&amp;nbsp;value (0 or 1).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you test&lt;FONT face="courier new,courier"&gt; region eq 1,&lt;/FONT&gt; which triggers the message as the values are of different type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your test is malformed. You probably mean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;	where (Region eq 'North' AND Quantity lt 160) 
	   OR Customer eq "Pet's are Us" ; 
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 05:15:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455024#M115053</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-04-18T05:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with the Where clause proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455027#M115055</link>
      <description>&lt;P&gt;Great, Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about if I write the code:&lt;/P&gt;&lt;PRE&gt;Libname Review'/folders/myfolders/Review' ;
Libname Learn'/folders/myfolders/Learn' ;  
Libname myformat'/folders/myfolders/sasuser.v94' ; 
Options fmtsearch=(myformat) ;

Proc Print data=learn.sales noobs ; 
	where (Region eq 'North' AND Quantity lt 160) ; 
	where Customer eq "Pet's are Us" ; /* Double "" because Pet's*/
run ; &lt;BR /&gt;&lt;BR /&gt;This seems to only produce results for the second where clause (Pets are Us). Why is that? &lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Apr 2018 05:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455027#M115055</guid>
      <dc:creator>ManitobaMoose</dc:creator>
      <dc:date>2018-04-18T05:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with the Where clause proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455028#M115056</link>
      <description>&lt;P&gt;the second clause replaces the first one.&lt;/P&gt;
&lt;P&gt;is this home work?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 05:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455028#M115056</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-04-18T05:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with the Where clause proc print</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455238#M115140</link>
      <description>&lt;P&gt;Hi, I'm teaching myself SAS from Learning SAS by Example. It has answers to only the odd problems. Plus, it helps to learn the concept by going on here when I am truly unclear about something.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 15:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-the-Where-clause-proc-print/m-p/455238#M115140</guid>
      <dc:creator>ManitobaMoose</dc:creator>
      <dc:date>2018-04-18T15:09:16Z</dc:date>
    </item>
  </channel>
</rss>

