<?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 Brackets not eliminating records as they should in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134023#M36360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;Proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;Create table mkt1 as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;Select a.id,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.status_cd,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.sub_category,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.template1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.balance1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.State_Abbr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;from datamart1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt; left join States&amp;nbsp;&amp;nbsp;&amp;nbsp; b&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp; on a.state_marker=b.state_marker&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;where (a.subcategory in (‘F’,’N’) and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt; balance1 &amp;gt;0&amp;nbsp; and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;(a.status_cd ne ‘S’ and a.status_cd ne ‘Y’)&lt;/STRONG&gt;&lt;/SPAN&gt; and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000; background: white; font-family: 'Courier New';"&gt;(a.template1 ne ‘X’ and a.template1 ne ‘G’));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran this code above.&amp;nbsp; In checking the data, it did not eliminate the status_cd of 'S' or 'Y'.&amp;nbsp; I then took out the brackets for the status_cd and reran it.&amp;nbsp; It is running forever now and will not stop.&amp;nbsp; I want to eliminate the status_cd and the template1 that I have specified. The brackets are balanced so how come they fo not eliminate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 May 2013 21:01:11 GMT</pubDate>
    <dc:creator>omega1983</dc:creator>
    <dc:date>2013-05-13T21:01:11Z</dc:date>
    <item>
      <title>Brackets not eliminating records as they should</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134023#M36360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;Proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;Create table mkt1 as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;Select a.id,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.status_cd,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.sub_category,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.template1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.balance1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.State_Abbr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;from datamart1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt; left join States&amp;nbsp;&amp;nbsp;&amp;nbsp; b&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&amp;nbsp; on a.state_marker=b.state_marker&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;where (a.subcategory in (‘F’,’N’) and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt; balance1 &amp;gt;0&amp;nbsp; and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;(a.status_cd ne ‘S’ and a.status_cd ne ‘Y’)&lt;/STRONG&gt;&lt;/SPAN&gt; and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000; background: white; font-family: 'Courier New';"&gt;(a.template1 ne ‘X’ and a.template1 ne ‘G’));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran this code above.&amp;nbsp; In checking the data, it did not eliminate the status_cd of 'S' or 'Y'.&amp;nbsp; I then took out the brackets for the status_cd and reran it.&amp;nbsp; It is running forever now and will not stop.&amp;nbsp; I want to eliminate the status_cd and the template1 that I have specified. The brackets are balanced so how come they fo not eliminate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 21:01:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134023#M36360</guid>
      <dc:creator>omega1983</dc:creator>
      <dc:date>2013-05-13T21:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets not eliminating records as they should</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134024#M36361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're looking for&lt;/P&gt;&lt;P&gt;a.status_cd not in ("S", "Y") and a.template1 not in ("X", "G") instead of all the ands&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 21:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134024#M36361</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-05-13T21:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Brackets not eliminating records as they should</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134025#M36362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It worked like a charm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 18:47:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Brackets-not-eliminating-records-as-they-should/m-p/134025#M36362</guid>
      <dc:creator>omega1983</dc:creator>
      <dc:date>2013-05-14T18:47:56Z</dc:date>
    </item>
  </channel>
</rss>

