<?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: Basic question about OR in a WHERE-statement in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93039#M968</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple way to do this (subject to the answer to Patrick's question) is to use the IN operator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE &amp;amp;last_updated_month IN ("&amp;amp;month1", "month2", "&amp;amp;month3")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which should boil down to doing exactly the same as your second syntax suggestion.&amp;nbsp; The first suggestion whilst it would be nice is not supported in SAS data steps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2012 09:09:40 GMT</pubDate>
    <dc:creator>MarkJones</dc:creator>
    <dc:date>2012-10-12T09:09:40Z</dc:date>
    <item>
      <title>Basic question about OR in a WHERE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93037#M966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a where-statement, where I need to extract entries from three different months, should it work to use this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;amp;last_updated_month" EQ "&amp;amp;month1" | "month2" | "&amp;amp;month3"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, must I use this more convoluted version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&amp;amp;last_updated_month" EQ "&amp;amp;month1") OR (&amp;amp;last_updated_month" EQ "month2") OR (&amp;amp;last_updated_month" EQ"&amp;amp;month3")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry about the simple case question, but I don't have access to a historical data set to test it on now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 06:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93037#M966</guid>
      <dc:creator>EinarRoed</dc:creator>
      <dc:date>2012-10-12T06:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Basic question about OR in a WHERE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93038#M967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where is the WHERE used?&lt;/P&gt;&lt;P&gt;In a datastep, procs sql, other proc?&lt;/P&gt;&lt;P&gt;As a statement or dataset option?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 09:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93038#M967</guid>
      <dc:creator>Patrick_Tan</dc:creator>
      <dc:date>2012-10-12T09:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Basic question about OR in a WHERE-statement</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93039#M968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple way to do this (subject to the answer to Patrick's question) is to use the IN operator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE &amp;amp;last_updated_month IN ("&amp;amp;month1", "month2", "&amp;amp;month3")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which should boil down to doing exactly the same as your second syntax suggestion.&amp;nbsp; The first suggestion whilst it would be nice is not supported in SAS data steps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 09:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Basic-question-about-OR-in-a-WHERE-statement/m-p/93039#M968</guid>
      <dc:creator>MarkJones</dc:creator>
      <dc:date>2012-10-12T09:09:40Z</dc:date>
    </item>
  </channel>
</rss>

