<?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: proc sql where not equal in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789351#M81418</link>
    <description>&lt;P&gt;Change "not =" to "ne".&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jan 2022 20:11:37 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-01-10T20:11:37Z</dc:date>
    <item>
      <title>proc sql where not equal</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789340#M81416</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not= does not work in my program. what is the error? thanks&lt;/P&gt;
&lt;P&gt;roc sql;&lt;BR /&gt;create table stat_data as&lt;BR /&gt;select * from Penality&lt;BR /&gt;where &lt;BR /&gt;specific_Industry_of_Parent not = 'mortgage lending' or specific_Industry_of_Parent not = "commodity trading; mining" or specific_Industry_of_Parent not= 'banking' &lt;BR /&gt;or specific_Industry_of_Parent not = "insurance" or specific_Industry_of_Parent not = "financial services" or specific_Industry_of_Parent not = "banking &amp;amp; securities" &lt;BR /&gt;or specific_Industry_of_Parent not = "investment advisory services";&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 19:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789340#M81416</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-01-10T19:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql where not equal</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789343#M81417</link>
      <description>&lt;P&gt;there is no error in the log but the input table did not change&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 20:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789343#M81417</guid>
      <dc:creator>sasphd</dc:creator>
      <dc:date>2022-01-10T20:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql where not equal</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789351#M81418</link>
      <description>&lt;P&gt;Change "not =" to "ne".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 20:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789351#M81418</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-01-10T20:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql where not equal</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789365#M81419</link>
      <description>&lt;P&gt;Use NOT IN instead of NOT =&lt;/P&gt;
&lt;P&gt;And SQL requires a QUIT, not RUN.&lt;/P&gt;
&lt;P&gt;I'd also recommend using either single or double quote consistently but that's not something I excel at either &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this is a lot cleaner IMO:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table stat_data as
select * from Penality
where
specific_Industry_of_Parent not in ( 
'mortgage lending', 
 "commodity trading; mining", 
 'banking',
 "insurance",
 "financial services",
 "banking &amp;amp; securities", 
 "investment advisory services");
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4327"&gt;@sasphd&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not= does not work in my program. what is the error? thanks&lt;/P&gt;
&lt;P&gt;roc sql;&lt;BR /&gt;create table stat_data as&lt;BR /&gt;select * from Penality&lt;BR /&gt;where &lt;BR /&gt;specific_Industry_of_Parent not = 'mortgage lending' or specific_Industry_of_Parent not = "commodity trading; mining" or specific_Industry_of_Parent not= 'banking' &lt;BR /&gt;or specific_Industry_of_Parent not = "insurance" or specific_Industry_of_Parent not = "financial services" or specific_Industry_of_Parent not = "banking &amp;amp; securities" &lt;BR /&gt;or specific_Industry_of_Parent not = "investment advisory services";&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 21:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789365#M81419</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-10T21:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql where not equal</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789374#M81420</link>
      <description>&lt;P&gt;Since this seems to select as expected:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table junk as
   select * from sashelp.class
   where sex not = 'F'
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;perhaps the issue is with the spelling of your values. = would be case and space sensitive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run this and show the result:&lt;/P&gt;
&lt;PRE&gt;proc sql;
   select distinct specific_industry_of_Parent
   from Penality
  ;
quit;&lt;/PRE&gt;
&lt;P&gt;Any chance the data set is actually named "Penalty" and not "Penality"?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 17:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-where-not-equal/m-p/789374#M81420</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-13T17:17:15Z</dc:date>
    </item>
  </channel>
</rss>

