<?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 output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752163#M236895</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;It's proc sql number if you want row numbers to be displayed. There is no proc sql num.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Mon, 05 Jul 2021 20:51:28 GMT</pubDate>
    <dc:creator>tarheel13</dc:creator>
    <dc:date>2021-07-05T20:51:28Z</dc:date>
    <item>
      <title>Proc sql output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752063#M236841</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data new1;
input id ;
datalines;
1
.
1
1
;
run;

data new2;
input id ;
datalines;
1
1
1
;
run;

proc sort data=new1 ;
by id;
run;


proc sort data=new2;
by id;
run;



data left;
merge new1 (in=a) new2 (in=b);
by id;
if  a then output;
proc print;
run ;

Proc sql num;
Select a.*, b.* from new1 a left outer join new2 b on a.id=b.id;
Quit;

data left;
merge new1 (in=a) new2 (in=b);
by id;
if  b then output;
proc print;
run ;

Proc sql num;
Select a.*, b.* from new1 a right outer join new2 b on a.id=b.id;
Quit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anandkvn_0-1625485315480.png" style="width: 534px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60950iC2C25037E6AB4B16/image-dimensions/534x80?v=v2" width="534" height="80" role="button" title="Anandkvn_0-1625485315480.png" alt="Anandkvn_0-1625485315480.png" /&gt;&lt;/span&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 11:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752063#M236841</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-07-05T11:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752077#M236850</link>
      <description>&lt;P&gt;Do not post pictures(!) of the log summary. Post the&amp;nbsp;&lt;EM&gt;complete&lt;/EM&gt; &lt;EM&gt;log text&lt;/EM&gt; by copy/pasting it into a code box opened with the &amp;lt;/&amp;gt; button.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 12:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752077#M236850</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-05T12:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752090#M236856</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run your code, the error that is shown with the code in the log highlights the word num as the issue:&lt;/P&gt;
&lt;PRE&gt; 121        Proc sql num;
                     ___
                     22
                     202
 ERROR 22-322: Syntax error, expecting one of the following: ;, CHECK, CODEGEN, CONSTDATETIME, DICTDIAG, DOUBLE, DQUOTE, ERRORSTOP, 
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Removing num allows me to run the code without an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 13:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752090#M236856</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2021-07-05T13:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sql output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752163#M236895</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;It's proc sql number if you want row numbers to be displayed. There is no proc sql num.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 05 Jul 2021 20:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-sql-output/m-p/752163#M236895</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-07-05T20:51:28Z</dc:date>
    </item>
  </channel>
</rss>

