<?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: SAS Merging two dataset by using Proc SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Merging-two-dataset-by-using-Proc-SQL/m-p/833588#M329536</link>
    <description>&lt;P&gt;that comma after 'a.arm' is likely the culprit. There shouldn't be a comma before the FROM statement.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 13:42:51 GMT</pubDate>
    <dc:creator>svh</dc:creator>
    <dc:date>2022-09-15T13:42:51Z</dc:date>
    <item>
      <title>SAS Merging two dataset by using Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Merging-two-dataset-by-using-Proc-SQL/m-p/833586#M329535</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do need to use proc sql to merge two dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting an error when I am using following code. It seems like I am getting error from line 4 (&lt;CODE class=""&gt;from lptssp.dm a ).&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=""&gt;&lt;STRONG&gt;SAS Code:&lt;/STRONG&gt; &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc Sql;
	create table _input_dataset_ex as
		select a.usubjid, a.arm,  
			from lptssp.dm a 
				right join (select * from &amp;amp;input_dataset_ex) b 
					on a.usubjid=b.usubjid
				where a.arm ne '';
quit;&lt;BR /&gt;&lt;BR /&gt;Error: &lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error log:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MPRINT(D0UNBLIND0EX): proc sql;&lt;BR /&gt;NOTE: Line generated by the invoked macro "D0UNBLIND0EX".&lt;BR /&gt;218 create table _input_dataset_ex as select a.usubjid, a.arm,&lt;BR /&gt;218! from lptssp.dm a right join (select * from &amp;amp;input_dataset_ex) b on a.usubjid=b.usubjid&lt;BR /&gt;------ -&lt;BR /&gt;22 79&lt;BR /&gt;218! where a.arm ne ''; quit; */ ; proc sort data=_input_dataset_ex&lt;BR /&gt;SYMBOLGEN: Macro variable INPUT_DATASET_EX resolves to lptssp.ex&lt;BR /&gt;MPRINT(D0UNBLIND0EX): create table _input_dataset_ex as select a.usubjid, a.arm, from lptssp.dm&lt;BR /&gt;a right join (select * from lptssp.ex) b on a.usubjid=b.usubjid where a.arm ne '';&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, /, &amp;lt;,&lt;BR /&gt;&amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, FROM, GE, GET, GT, GTT, LE,&lt;BR /&gt;LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 79-322: Expecting a FROM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 13:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Merging-two-dataset-by-using-Proc-SQL/m-p/833586#M329535</guid>
      <dc:creator>dht115</dc:creator>
      <dc:date>2022-09-15T13:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Merging two dataset by using Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Merging-two-dataset-by-using-Proc-SQL/m-p/833588#M329536</link>
      <description>&lt;P&gt;that comma after 'a.arm' is likely the culprit. There shouldn't be a comma before the FROM statement.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 13:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Merging-two-dataset-by-using-Proc-SQL/m-p/833588#M329536</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2022-09-15T13:42:51Z</dc:date>
    </item>
  </channel>
</rss>

