<?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: Join two tables of different legth without using specific joins in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569163#M160352</link>
    <description>&lt;P&gt;I was given the VBA Code that connects to the SAS Server and was told it only supports PROC SQL. I know it can handle more if coded to but I don't know how to write that code. Do you have experience in that or can point me somewhere to learn more? I've tried googling a ton to no avail. Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2019 16:56:58 GMT</pubDate>
    <dc:creator>mhoward2</dc:creator>
    <dc:date>2019-06-26T16:56:58Z</dc:date>
    <item>
      <title>Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569096#M160323</link>
      <description>&lt;P&gt;Ill start off by saying what I need to complete must only be done using the Proc Sql Procedures in Enterprise Guide since I only have VBA set execute Proc Sql statements when connected to the SAS server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to take a table with say 5 columns and 50 rows and add another table and another table with 2 columns and 55 rows side by side without anything in common to join on? Just start at row one for each and go down from there? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 13:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569096#M160323</guid>
      <dc:creator>mhoward2</dc:creator>
      <dc:date>2019-06-26T13:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569099#M160325</link>
      <description>&lt;P&gt;Welcome to the SAS Communities &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;Sounds like a Merge Statement without a By Statement can do the trick for you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   merge sashelp.iris sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2019 13:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569099#M160325</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-26T13:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569101#M160326</link>
      <description>&lt;P&gt;Hi! Thanks for taking the time to help! As mentioned though I'm only looking for solutions that use PROC SQL and not data steps since I cant use them when connected to the SAS server through VBA. Is this possible with PROC SQL? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 13:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569101#M160326</guid>
      <dc:creator>mhoward2</dc:creator>
      <dc:date>2019-06-26T13:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569129#M160338</link>
      <description>&lt;P&gt;Why wound connecting via VBA limit you to using only one PROC?&lt;/P&gt;
&lt;P&gt;Did some one write you a specific module that wraps all of your SAS code with PROC SQL and QUIT statements?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 15:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569129#M160338</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-26T15:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569163#M160352</link>
      <description>&lt;P&gt;I was given the VBA Code that connects to the SAS Server and was told it only supports PROC SQL. I know it can handle more if coded to but I don't know how to write that code. Do you have experience in that or can point me somewhere to learn more? I've tried googling a ton to no avail. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 16:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569163#M160352</guid>
      <dc:creator>mhoward2</dc:creator>
      <dc:date>2019-06-26T16:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569250#M160395</link>
      <description>&lt;P&gt;Short answer: No. You can't join two tables one-to-one in SAS/SQL without a join condition. Joining without a join condition is allowed, but results in the cartesian product of the tables.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 19:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569250#M160395</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-26T19:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables of different legth without using specific joins</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569251#M160396</link>
      <description>&lt;P&gt;Long answer, perhaps, if you trust the undocumented MONOTONIC() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
create table want as 
select * 
from (select name,monotonic() as arow from sashelp.class(obs=10)) a
full join 
     (select name as name2,age,monotonic() as brow from sashelp.class(obs=5)) b
on a.arow = b.brow
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Obs    Name       arow     name2     Age    brow

  1    Alfred       1     Alfred      14      1
  2    Alice        2     Alice       13      2
  3    Barbara      3     Barbara     13      3
  4    Carol        4     Carol       14      4
  5    Henry        5     Henry       14      5
  6    James        6                  .      .
  7    Jane         7                  .      .
  8    Janet        8                  .      .
  9    Jeffrey      9                  .      .
 10    John        10                  .      .
&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2019 19:11:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-two-tables-of-different-legth-without-using-specific-joins/m-p/569251#M160396</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-26T19:11:58Z</dc:date>
    </item>
  </channel>
</rss>

