<?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 and where = data set option in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15929#M2868</link>
    <description>First time heard of where also. This is better than putting a group of conditions on a new line (my clumsy way to chop them up). Thank you!</description>
    <pubDate>Thu, 14 Oct 2010 22:15:12 GMT</pubDate>
    <dc:creator>mnew</dc:creator>
    <dc:date>2010-10-14T22:15:12Z</dc:date>
    <item>
      <title>where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15924#M2863</link>
      <description>Greetings:&lt;BR /&gt;
&lt;BR /&gt;
Does any of your experts know whether a where statement in data step for subsetting is processed differently from where =  dataset option, when there is only one input dataset?&lt;BR /&gt;
&lt;BR /&gt;
Here is the only quote from SAS help that I found.&lt;BR /&gt;
&lt;BR /&gt;
"The WHERE statement applies to all input data sets, whereas the WHERE= data set option selects observations only from the data set for which it is specified."&lt;BR /&gt;
&lt;BR /&gt;
My friend also read from somewhere that a where = option is more efficient as it only brings the qualified observations into PDV, while a where statement will read in all the observations then discard the unqualified data. What he mentioned also sounds like the difference between IF and Where statement for subsetting, so I'm a bit confused.&lt;BR /&gt;
&lt;BR /&gt;
Thank you!</description>
      <pubDate>Wed, 13 Oct 2010 05:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15924#M2863</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-13T05:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15925#M2864</link>
      <description>The WHERE statement and WHERE=  data set option are equivalent, for example, when you have only one dataset referenced on the SET statement (or when using a PROC that accepts WHERE filtering, when loading input data into the PDV.  I find the WHERE statement easier to code.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
+"where statement" +where +"data set option" site:sas.com

Message was edited by: sbb</description>
      <pubDate>Wed, 13 Oct 2010 08:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15925#M2864</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-13T08:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15926#M2865</link>
      <description>Additionally the WHERE statement can be augmented ( by using WHERE ALSO). A technique that is sometimes (or for some people) easier to read/understand than complex AND constructs.&lt;BR /&gt;
&lt;BR /&gt;
Sample code snippet:&lt;BR /&gt;
[pre]&lt;BR /&gt;
where age gt 12 and age lt 15 ;&lt;BR /&gt;
where also weight gt 60 and weight lt 80 ;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 13 Oct 2010 09:03:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15926#M2865</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2010-10-13T09:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15927#M2866</link>
      <description>To follow-up on Scott's post, because the WHERE statement is a "declarative" statement, it is addressed at the data step compile time and would have the same effect as a WHERE =.&lt;BR /&gt;
&lt;BR /&gt;
A subsetting IF statement  is an "executable" statement and it's location in a data step can make a significant difference in how fast a program runs.&lt;BR /&gt;
&lt;BR /&gt;
See&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a001225397.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a001225397.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Wed, 13 Oct 2010 12:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15927#M2866</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-10-13T12:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15928#M2867</link>
      <description>This is very helpful. I often could not find what I was looking for on sas.com. Now I can try this search trick you taught me!</description>
      <pubDate>Thu, 14 Oct 2010 22:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15928#M2867</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-14T22:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15929#M2868</link>
      <description>First time heard of where also. This is better than putting a group of conditions on a new line (my clumsy way to chop them up). Thank you!</description>
      <pubDate>Thu, 14 Oct 2010 22:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15929#M2868</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-14T22:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: where statement and where = data set option</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15930#M2869</link>
      <description>Wish I had the web page you recommended handy when I was taking the programming one class. Thanks!</description>
      <pubDate>Thu, 14 Oct 2010 22:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-and-where-data-set-option/m-p/15930#M2869</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-10-14T22:25:55Z</dc:date>
    </item>
  </channel>
</rss>

