<?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: How to use the 'Not in' operator in proc step where they are two datasets? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750207#M235916</link>
    <description>&lt;P&gt;You have the AND in the wrong place.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where customer_number not in (select distinct customer_number from supp_data)
  and customer_number not in (select distinct customer_number from ntb_data)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Jun 2021 14:06:10 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-06-24T14:06:10Z</dc:date>
    <item>
      <title>How to use the 'Not in' operator in proc step where they are two datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750202#M235913</link>
      <description>&lt;P&gt;I want to select only those observations from a table (Final_lIst) which don't belong in any of the two other tables (supp_data and ntb_data)&lt;/P&gt;
&lt;P&gt;Will this code work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table Final_list as&lt;/P&gt;
&lt;P&gt;select * from final_list&lt;/P&gt;
&lt;P&gt;where customer_number&lt;/P&gt;
&lt;P&gt;not in &lt;BR /&gt;(select distinct&amp;nbsp;customer_number from&amp;nbsp;supp_data and ntb_data &amp;nbsp;) ;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 13:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750202#M235913</guid>
      <dc:creator>Shradha1</dc:creator>
      <dc:date>2021-06-24T13:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the 'Not in' operator in proc step where they are two datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750204#M235914</link>
      <description>&lt;P&gt;Unfortunately not, but this may ... if it doesn't post the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table Final_list as

select * from final_list

where customer_number

not in
(select distinct customer_number from supp_data union select distinct customer_number from ntb_data  ) ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jun 2021 13:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750204#M235914</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-24T13:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the 'Not in' operator in proc step where they are two datasets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750207#M235916</link>
      <description>&lt;P&gt;You have the AND in the wrong place.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where customer_number not in (select distinct customer_number from supp_data)
  and customer_number not in (select distinct customer_number from ntb_data)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jun 2021 14:06:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-the-Not-in-operator-in-proc-step-where-they-are-two/m-p/750207#M235916</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-06-24T14:06:10Z</dc:date>
    </item>
  </channel>
</rss>

