<?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 Where statement with two conditions in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32148#M4232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to SAS and trying to modify and existing proc.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now the code looks like this. I want to add a second condition the where statement so that it's picking up where transtypedesc does not equal either 'change account' or 'void account'.&amp;nbsp; So I want to exclude change and void statuses.&amp;nbsp; I've tried a handful of attempts to add a second condition to the where statement and keep getting errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;inner join acct.State as d on c.LobGuid = d.LobGuid&lt;/P&gt;&lt;P&gt;inner join acct.loc as e on d.StateGuid = e.StateGuid&lt;/P&gt;&lt;P&gt;inner join acct.locItemInfo as f on e.LocGuid = f.LocGuid&lt;/P&gt;&lt;P&gt;where BusinessUnitCd = 'AA' &lt;/P&gt;&lt;P&gt;and TransTypeDesc &amp;lt;&amp;gt; 'CHANGE ACCOUNT');&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2011 20:11:21 GMT</pubDate>
    <dc:creator>tmetro</dc:creator>
    <dc:date>2011-10-20T20:11:21Z</dc:date>
    <item>
      <title>Where statement with two conditions</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32148#M4232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to SAS and trying to modify and existing proc.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now the code looks like this. I want to add a second condition the where statement so that it's picking up where transtypedesc does not equal either 'change account' or 'void account'.&amp;nbsp; So I want to exclude change and void statuses.&amp;nbsp; I've tried a handful of attempts to add a second condition to the where statement and keep getting errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;inner join acct.State as d on c.LobGuid = d.LobGuid&lt;/P&gt;&lt;P&gt;inner join acct.loc as e on d.StateGuid = e.StateGuid&lt;/P&gt;&lt;P&gt;inner join acct.locItemInfo as f on e.LocGuid = f.LocGuid&lt;/P&gt;&lt;P&gt;where BusinessUnitCd = 'AA' &lt;/P&gt;&lt;P&gt;and TransTypeDesc &amp;lt;&amp;gt; 'CHANGE ACCOUNT');&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 20:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32148#M4232</guid>
      <dc:creator>tmetro</dc:creator>
      <dc:date>2011-10-20T20:11:21Z</dc:date>
    </item>
    <item>
      <title>Where statement with two conditions</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32149#M4233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where BusinessUnitCd = 'AA'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and not upcase(TransTypeDesc) in ("CHANGE ACCOUNT","VOID ACCOUNT")&lt;/P&gt;&lt;P&gt; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your current statement ended with a parenthesis, but you didn't show all of your code, thus don't know if an additional parenthesis is needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 20:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32149#M4233</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-20T20:32:50Z</dc:date>
    </item>
    <item>
      <title>Where statement with two conditions</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32150#M4234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Nice one sir.&amp;nbsp; You were correct.&amp;nbsp; There were two places where the end paren was not added when the original programmer added the 2nd condition.&amp;nbsp; I was so busy looking at the syntax and trying to work around that and I didn't notice the issue.&amp;nbsp; Unfortunately SAS EG didn't throw an error on the missing paren, like it would in VBA, it just got hung-up.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 22:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32150#M4234</guid>
      <dc:creator>tmetro</dc:creator>
      <dc:date>2011-10-20T22:29:08Z</dc:date>
    </item>
    <item>
      <title>Where statement with two conditions</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32151#M4235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is twice today that people have called me "Sir".&amp;nbsp; I REALLY prefer "Art" these days.&amp;nbsp; But, glad to see that you have identified the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 22:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Where-statement-with-two-conditions/m-p/32151#M4235</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-20T22:34:53Z</dc:date>
    </item>
  </channel>
</rss>

