<?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: Pro Sql selection criteria Issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pro-Sql-selection-criteria-Issue/m-p/185356#M265558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subquery is not required here , also it slows down the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: 'Courier New'; color: navy;"&gt;Proc&lt;/STRONG&gt; &lt;STRONG style="font-style: inherit; font-family: 'Courier New'; color: navy;"&gt;Sql&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; House_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; have&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; House_ID &amp;lt;&amp;gt; '02'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; and Apple=&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em; font-style: inherit; font-family: 'Courier New'; color: teal;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;STRONG style="font-style: inherit; font-family: 'Courier New'; color: navy;"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;Just confirm the syntax for not equal to expression : &amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;Vishal&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Feb 2014 05:55:19 GMT</pubDate>
    <dc:creator>vishal_prof_gmail_com</dc:creator>
    <dc:date>2014-02-25T05:55:19Z</dc:date>
    <item>
      <title>Pro Sql selection criteria Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pro-Sql-selection-criteria-Issue/m-p/185355#M265557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;House_ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Code&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Apple&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset similar to the above but with many more rows and more complicated.&lt;/P&gt;&lt;P&gt;I would like to select the distinct House_ID with NO Code=02 &amp;amp;&amp;nbsp; Apple=1, in other words House_ID=3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use the below I get ALLc Sq the House_ID with Apple=1, as well the House_ID &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;not in (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; House_ID &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Code&amp;nbsp; in (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'02'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;Proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;Sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; House_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; House_ID not in (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; House_ID &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Code&amp;nbsp; in (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'02'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;)) &amp;amp; Apple=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 05:18:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pro-Sql-selection-criteria-Issue/m-p/185355#M265557</guid>
      <dc:creator>apple</dc:creator>
      <dc:date>2014-02-25T05:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Pro Sql selection criteria Issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pro-Sql-selection-criteria-Issue/m-p/185356#M265558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subquery is not required here , also it slows down the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: 'Courier New'; color: navy;"&gt;Proc&lt;/STRONG&gt; &lt;STRONG style="font-style: inherit; font-family: 'Courier New'; color: navy;"&gt;Sql&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;select&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; House_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; have&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; House_ID &amp;lt;&amp;gt; '02'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; and Apple=&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; line-height: 1.5em; font-style: inherit; font-family: 'Courier New'; color: teal;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;STRONG style="font-style: inherit; font-family: 'Courier New'; color: navy;"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;Just confirm the syntax for not equal to expression : &amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: white; background-position: 0% 0%;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'Courier New'; color: black;"&gt;Vishal&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 05:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pro-Sql-selection-criteria-Issue/m-p/185356#M265558</guid>
      <dc:creator>vishal_prof_gmail_com</dc:creator>
      <dc:date>2014-02-25T05:55:19Z</dc:date>
    </item>
  </channel>
</rss>

