<?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: looks like join but not in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845513#M334264</link>
    <description>Filtered cross product which essentially becomes an inner join. &lt;BR /&gt;Not the best way to program IMO.</description>
    <pubDate>Mon, 21 Nov 2022 18:47:47 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-11-21T18:47:47Z</dc:date>
    <item>
      <title>looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845385#M334212</link>
      <description>&lt;PRE&gt;proc sql;
      create table mthbal_bal as
      select mthbal_org as ambs_org,
                mthbal_acct as ambs_acct,
                mthbal_curr_bal as mthend_bal,
                mthbal_crlim,
                intnx("month", a.mthbal_load_Dt,0,"E") as mthend_date
      from mthbal a,
               acct_new_all b
      where a.mthbal_org=b.org_code
      and a.mthbal_acct=b.account_no;
quit;
 

&lt;/PRE&gt;
&lt;P&gt;what kind of program is this? looks like 'join' but without saying what the join is?&lt;/P&gt;
&lt;P&gt;what is it doing?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 03:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845385#M334212</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-11-21T03:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845387#M334213</link>
      <description>&lt;P&gt;Read in detail the SAS Docu &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/fedsqlref/p1q7agzgxs9ik5n1p7k3sdft0u9u.htm" target="_self"&gt;here&lt;/A&gt; and then eventually ask questions if the docu is not clear enough.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 03:55:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845387#M334213</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-11-21T03:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845389#M334214</link>
      <description>&lt;P&gt;This is standard alternative SQL syntax for simple joins. It is equivalent to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
      create table mthbal_bal as
      select mthbal_org as ambs_org,
                mthbal_acct as ambs_acct,
                mthbal_curr_bal as mthend_bal,
                mthbal_crlim,
                intnx("month", a.mthbal_load_Dt,0,"E") as mthend_date
      from 
		mthbal a inner join 
		acct_new_all b 
			on a.mthbal_org=b.org_cod and a.mthbal_acct=b.account_no;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 04:13:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845389#M334214</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-11-21T04:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845470#M334248</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845470#M334248</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-11-21T13:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845473#M334249</link>
      <description>&lt;P&gt;The effect is similar to an inner join, but that is just because of the particular WHERE expression used.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it is a Cartesian product, every observation in each dataset is paired with every observation with the other dataset.&amp;nbsp; So a FULL JOIN&amp;nbsp; with an always true ON condition is more accurate description of the join type.&amp;nbsp; The results are then filtered by the WHERE condition which is what causes the result to be the equivalent of an INNER JOIN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that is frequently the intent of the user when using that comma separator between the source dataset names to effect an inner join, but not always.&amp;nbsp; Sometimes you will use it to produce the Cartesian product.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 14:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845473#M334249</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-21T14:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845511#M334263</link>
      <description>&lt;P&gt;Yes, to get the cross product of two tables,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select * from A, B;

/* is equivalent to */

select * from A cross join B;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 18:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845511#M334263</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-11-21T18:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: looks like join but not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845513#M334264</link>
      <description>Filtered cross product which essentially becomes an inner join. &lt;BR /&gt;Not the best way to program IMO.</description>
      <pubDate>Mon, 21 Nov 2022 18:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/looks-like-join-but-not/m-p/845513#M334264</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-11-21T18:47:47Z</dc:date>
    </item>
  </channel>
</rss>

