<?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: Question about SAS Tip: where also in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455998#M115460</link>
    <description>&lt;P&gt;Usually this comes into play when you're possibly developing macros and you don't know how many conditions you may have. So its helpful to be able to create a line for each one with the ALSO without having to determine if you need an AND between each condition.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are multiple ways to account for this, but this is a nice option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44881"&gt;@dgritt&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;This is a response to&amp;nbsp;&lt;A title="SAS Tip: where also" href="https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-where-also/m-p/442603#M119" target="_self"&gt;SAS Tip: where also&lt;/A&gt;&amp;nbsp;by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192946"&gt;@SAS_Tipster&lt;/a&gt;/&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13569"&gt;@DonH&lt;/a&gt;&amp;nbsp;since the topic is locked and replies are no longer allowed.&lt;BR /&gt;&lt;BR /&gt;Is there a reason for using "also" over "and" in a where statement? Is one more efficient?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 16:37:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-04-20T16:37:57Z</dc:date>
    <item>
      <title>Question about SAS Tip: where also</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455996#M115458</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This is a response to&amp;nbsp;&lt;A title="SAS Tip: where also" href="https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-where-also/m-p/442603#M119" target="_self"&gt;SAS Tip: where also&lt;/A&gt;&amp;nbsp;by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192946"&gt;@SAS_Tipster&lt;/a&gt;/&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13569"&gt;@DonH&lt;/a&gt;&amp;nbsp;since the topic is locked and replies are no longer allowed.&lt;BR /&gt;&lt;BR /&gt;Is there a reason for using "also" over "and" in a where statement? Is one more efficient?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455996#M115458</guid>
      <dc:creator>dgritt</dc:creator>
      <dc:date>2018-04-20T16:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Question about SAS Tip: where also</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455998#M115460</link>
      <description>&lt;P&gt;Usually this comes into play when you're possibly developing macros and you don't know how many conditions you may have. So its helpful to be able to create a line for each one with the ALSO without having to determine if you need an AND between each condition.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are multiple ways to account for this, but this is a nice option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44881"&gt;@dgritt&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;This is a response to&amp;nbsp;&lt;A title="SAS Tip: where also" href="https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-where-also/m-p/442603#M119" target="_self"&gt;SAS Tip: where also&lt;/A&gt;&amp;nbsp;by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192946"&gt;@SAS_Tipster&lt;/a&gt;/&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13569"&gt;@DonH&lt;/a&gt;&amp;nbsp;since the topic is locked and replies are no longer allowed.&lt;BR /&gt;&lt;BR /&gt;Is there a reason for using "also" over "and" in a where statement? Is one more efficient?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:37:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455998#M115460</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-20T16:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Question about SAS Tip: where also</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455999#M115461</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/44881"&gt;@dgritt&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;This is a response to&amp;nbsp;&lt;A title="SAS Tip: where also" href="https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-where-also/m-p/442603#M119" target="_self"&gt;SAS Tip: where also&lt;/A&gt;&amp;nbsp;by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/192946"&gt;@SAS_Tipster&lt;/a&gt;/&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13569"&gt;@DonH&lt;/a&gt;&amp;nbsp;since the topic is locked and replies are no longer allowed.&lt;BR /&gt;&lt;BR /&gt;Is there a reason for using "also" over "and" in a where statement? Is one more efficient?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;I suspect that the complier spends a little more time constructing an internal equivalent of the where statement using and with actual execution not varying much. But you could build a set and try that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Coding styles would be the main reason I think. Some folks just plain don't like really long statements. I'm not quite in that group but I do pay attention to coding style with such things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where also would also allow for single * line comments to test/modify code that might take a bit more care with longer statements.&lt;/P&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>Fri, 20 Apr 2018 16:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/455999#M115461</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question about SAS Tip: where also</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/456006#M115466</link>
      <description>&lt;P&gt;Reeza and ballardw beat me to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If if you look at the NOTE about the where clause, all of these variations produce the same note (for the sashelp.class data set):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;where age = 12 and sex = "M";&lt;/LI&gt;
&lt;LI&gt;where age = 12;&lt;BR /&gt;where same and sex = "M";&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;where also age = 12;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;where&amp;nbsp;also sex = "M"&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;So I suspect this is all reconciled at compile time.&lt;BR /&gt;&lt;BR /&gt;I like option 3 for both the multiple clauses issue (also applies to stored processes with parameters for multiple conditions) as well avoiding the case where adding a where clause later can replace the existing one. The also clause is just a reminder to check if there is already an active WHERE for the step.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 17:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-SAS-Tip-where-also/m-p/456006#M115466</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2018-04-20T17:14:07Z</dc:date>
    </item>
  </channel>
</rss>

