<?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 make NOT IN condition in SAS DI in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453688#M5204</link>
    <description>&lt;P&gt;Please post your log. I cannot imagine &lt;U&gt;cartesian&lt;/U&gt; join with sub-query of ID&amp;nbsp;&lt;STRONG&gt;NOT IN table_B&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;even if ID is not unique key in the table.&lt;/P&gt;
&lt;P&gt;May be there is another issue.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 18:14:00 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2018-04-12T18:14:00Z</dc:date>
    <item>
      <title>How to make NOT IN condition in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453440#M5195</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly let me know how to create sql not in sub query in SAS DI Studio.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example we have table A ( with Saving A/C) and Table B ( Loan A/C with Saving A/C) and we want to create a table which have account numbers containing only saving A/C.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl66" style="height: 15.0pt; width: 48pt;"&gt;Table A&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;Table B&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="width: 48pt;"&gt;Table C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt;"&gt;121&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-left: none;"&gt;123&lt;/TD&gt;
&lt;TD align="right" class="xl69" style="border-left: none;"&gt;121&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;122&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;126&lt;/TD&gt;
&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;122&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;123&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;128&lt;/TD&gt;
&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;125&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;124&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;124&lt;/TD&gt;
&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;127&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;125&lt;/TD&gt;
&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;120&lt;/TD&gt;
&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;129&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;126&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;127&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;128&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" class="xl68" style="height: 15.0pt; border-top: none;"&gt;129&lt;/TD&gt;
&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD height="21" align="right" class="xl70" style="height: 15.75pt; border-top: none;"&gt;120&lt;/TD&gt;
&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Query need to develop :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create table C as Select * from A where ID not in ( select ID from B);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have already tried with sql join transformation which includes sub-query in join condition with NOT IN but due to join (Inner join), It is providing Cartesian product.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS DI NOT IN.jpg" style="width: 321px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19735i7B28A7C8C13E2278/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS DI NOT IN.jpg" alt="SAS DI NOT IN.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly suggest any other way or am i missing something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Uma Shanker Saini&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 03:39:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453440#M5195</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2018-04-12T03:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to make NOT IN condition in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453467#M5198</link>
      <description>&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; create table_c as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; select * from table_a&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; where (cust not in (select cust from table_b));&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 08:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453467#M5198</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-04-12T08:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to make NOT IN condition in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453603#M5201</link>
      <description>&lt;P&gt;Hi Shmuel,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your quick reply but have you read the question properly ??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are unable to understand the question then please let me know i could explain in more lay man language.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Uma Shanker Saini&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 15:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453603#M5201</guid>
      <dc:creator>umashankersaini</dc:creator>
      <dc:date>2018-04-12T15:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make NOT IN condition in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453688#M5204</link>
      <description>&lt;P&gt;Please post your log. I cannot imagine &lt;U&gt;cartesian&lt;/U&gt; join with sub-query of ID&amp;nbsp;&lt;STRONG&gt;NOT IN table_B&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;even if ID is not unique key in the table.&lt;/P&gt;
&lt;P&gt;May be there is another issue.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 18:14:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/453688#M5204</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-04-12T18:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to make NOT IN condition in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/454194#M5236</link>
      <description>Sub-queries are a bit tricky in DI studio.&lt;BR /&gt;But you need to get rid of that join, and only keep the sub query. I believe you can do it locations of SQL Join transformation.</description>
      <pubDate>Sat, 14 Apr 2018 19:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-make-NOT-IN-condition-in-SAS-DI/m-p/454194#M5236</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-04-14T19:14:58Z</dc:date>
    </item>
  </channel>
</rss>

