<?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: opposite to inner join in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27823#M6387</link>
    <description>proc sql;&lt;BR /&gt;
select t1.*&lt;BR /&gt;
from &lt;BR /&gt;
  main t1 &lt;BR /&gt;
  left outer join minor t2&lt;BR /&gt;
      on t1.key=t2.key&lt;BR /&gt;
where &lt;BR /&gt;
   t2.key is null;&lt;BR /&gt;
&lt;BR /&gt;
quit;</description>
    <pubDate>Sat, 12 Mar 2011 23:14:29 GMT</pubDate>
    <dc:creator>DBailey</dc:creator>
    <dc:date>2011-03-12T23:14:29Z</dc:date>
    <item>
      <title>proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27820#M6384</link>
      <description>Hi, all&lt;BR /&gt;
&lt;BR /&gt;
Suppose I have two data sets Main and Minor each of which has a Variable called Key.&lt;BR /&gt;
&lt;BR /&gt;
Main Key&lt;BR /&gt;
          1&lt;BR /&gt;
          2&lt;BR /&gt;
          3&lt;BR /&gt;
          4&lt;BR /&gt;
          5&lt;BR /&gt;
&lt;BR /&gt;
Minor Key&lt;BR /&gt;
           1&lt;BR /&gt;
           3&lt;BR /&gt;
           5&lt;BR /&gt;
           7&lt;BR /&gt;
           9&lt;BR /&gt;
&lt;BR /&gt;
Inner Join on Key will give:&lt;BR /&gt;
1&lt;BR /&gt;
3&lt;BR /&gt;
5&lt;BR /&gt;
&lt;BR /&gt;
However what i want are those Main Key that are NOT included in Minor Key, i.e., the result I am looking for is:&lt;BR /&gt;
&lt;BR /&gt;
2&lt;BR /&gt;
4&lt;BR /&gt;
&lt;BR /&gt;
What kind of join can do this? or How to write Proc SQL codes to do this? Thanks.</description>
      <pubDate>Fri, 11 Mar 2011 21:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27820#M6384</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-03-11T21:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27821#M6385</link>
      <description>This is how I would do it, but there may be a better way:&lt;BR /&gt;
&lt;BR /&gt;
data set1;&lt;BR /&gt;
  x = 1 ; output;&lt;BR /&gt;
  x = 2 ; output;&lt;BR /&gt;
  x = 3 ; output;&lt;BR /&gt;
  x = 4 ; output;&lt;BR /&gt;
  x = 5 ; output;&lt;BR /&gt;
run;&lt;BR /&gt;
data set2;&lt;BR /&gt;
  x = 1 ; output;&lt;BR /&gt;
  x = 3 ; output;&lt;BR /&gt;
  x = 5 ; output;&lt;BR /&gt;
  x = 7 ; output;&lt;BR /&gt;
  x = 9 ; output;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table NotInner as&lt;BR /&gt;
  select set1.x&lt;BR /&gt;
    from set1 &lt;BR /&gt;
         left join&lt;BR /&gt;
         set2&lt;BR /&gt;
      on set1.x = set2.x&lt;BR /&gt;
   where set2.x is null;&lt;BR /&gt;
quit;</description>
      <pubDate>Fri, 11 Mar 2011 21:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27821#M6385</guid>
      <dc:creator>CurtisMack</dc:creator>
      <dc:date>2011-03-11T21:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27822#M6386</link>
      <description>thank you for help. I guess join may not be the best choice for such operation. Maybe EXCEPT is better?</description>
      <pubDate>Sat, 12 Mar 2011 04:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27822#M6386</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-03-12T04:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27823#M6387</link>
      <description>proc sql;&lt;BR /&gt;
select t1.*&lt;BR /&gt;
from &lt;BR /&gt;
  main t1 &lt;BR /&gt;
  left outer join minor t2&lt;BR /&gt;
      on t1.key=t2.key&lt;BR /&gt;
where &lt;BR /&gt;
   t2.key is null;&lt;BR /&gt;
&lt;BR /&gt;
quit;</description>
      <pubDate>Sat, 12 Mar 2011 23:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27823#M6387</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-03-12T23:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27824#M6388</link>
      <description>There's also a not exists.&lt;BR /&gt;
&lt;BR /&gt;
select t1.*&lt;BR /&gt;
from main t1&lt;BR /&gt;
where not exists (select * from minor where key=t1.key);&lt;BR /&gt;
quit;</description>
      <pubDate>Sat, 12 Mar 2011 23:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27824#M6388</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-03-12T23:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27825#M6389</link>
      <description>Hi.&lt;BR /&gt;
&lt;BR /&gt;
data set1;&lt;BR /&gt;
&lt;BR /&gt;
x = 1 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 2 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 3 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 4 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 5 ; output;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data set2;&lt;BR /&gt;
&lt;BR /&gt;
x = 1 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 3 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 5 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 7 ; output;&lt;BR /&gt;
&lt;BR /&gt;
x = 9 ; output;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
&lt;BR /&gt;
/* this way is suited only for all variables has the same value*/&lt;BR /&gt;
&lt;BR /&gt;
create table t1 as&lt;BR /&gt;
&lt;BR /&gt;
select *&lt;BR /&gt;
&lt;BR /&gt;
  from set1&lt;BR /&gt;
&lt;BR /&gt;
   except&lt;BR /&gt;
&lt;BR /&gt;
 select *&lt;BR /&gt;
&lt;BR /&gt;
  from set2;&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
&lt;BR /&gt;
/*another way*/&lt;BR /&gt;
&lt;BR /&gt;
  create table t2 as&lt;BR /&gt;
&lt;BR /&gt;
   select *&lt;BR /&gt;
&lt;BR /&gt;
    from set1&lt;BR /&gt;
&lt;BR /&gt;
     where x not in (select x from set2);&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp

Message was edited by: Ksharp</description>
      <pubDate>Mon, 14 Mar 2011 03:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27825#M6389</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-14T03:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27826#M6390</link>
      <description>thank you all for help.</description>
      <pubDate>Tue, 15 Mar 2011 20:09:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27826#M6390</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-03-15T20:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27827#M6391</link>
      <description>Hello Littlestone,&lt;BR /&gt;
&lt;BR /&gt;
You asking for proc SQL but the best way to do it is to use a datastep merge like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data Inner Notinner;&lt;BR /&gt;
  merge set1(in=s1) set2 (in=s2);&lt;BR /&gt;
  if s1 and s2 then output Inner;&lt;BR /&gt;
  if s1 and not s2 then output Notinner;&lt;BR /&gt;
  by x;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
This merge requires a preliminary sorting of set1 and set2 but simultaneously creates two desired outputs.&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 16 Mar 2011 13:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27827#M6391</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-16T13:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27828#M6392</link>
      <description>@SPR: In the case that the input datasets have some common satellite (or non-key) vars, your output dataset can be incorrect. Here's an example:&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;one;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;id&amp;nbsp;var&amp;nbsp;@@;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;1&amp;nbsp;2&amp;nbsp;2&amp;nbsp;3&amp;nbsp;3&amp;nbsp;4&amp;nbsp;4&amp;nbsp;5&amp;nbsp;5&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;two;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;id&amp;nbsp;var&amp;nbsp;@@;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;6&amp;nbsp;3&amp;nbsp;7&amp;nbsp;5&amp;nbsp;8&amp;nbsp;7&amp;nbsp;9&amp;nbsp;9&amp;nbsp;10&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;proc&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;sort&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;=one;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;id;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;proc&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;sort&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;=two;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;id;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;inner&amp;nbsp;notinner;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;merge&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;one(&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;=s1)&amp;nbsp;two(&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;=s2);&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;s1&amp;nbsp;and&amp;nbsp;s2&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;Inner;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;s1&amp;nbsp;and&amp;nbsp;not&amp;nbsp;s2&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;Notinner;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;id;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;proc&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;print&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;=inner;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;/*&amp;nbsp;on&amp;nbsp;lst&amp;nbsp;--&amp;nbsp;Uh-oh!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;*/&lt;/SPAN&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Mar 2011 14:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27828#M6392</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2011-03-16T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql: opposite to inner join</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27829#M6393</link>
      <description>Hello Chang_y_chung,&lt;BR /&gt;
&lt;BR /&gt;
It is very easy to overcome this obstacle simply renaming VAR for the second dataset.  &lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Wed, 16 Mar 2011 19:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-sql-opposite-to-inner-join/m-p/27829#M6393</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-16T19:05:07Z</dc:date>
    </item>
  </channel>
</rss>

