<?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: Problem in merging using proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578678#M164166</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;CONNECTION is a special word in SQL that has a special meaning, and it cannot be the name of a SAS data set.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That's why the error message say it is expecting TO, you have to specify a connection TO a database.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I didn't know it, thanks for the learn&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 12:38:53 GMT</pubDate>
    <dc:creator>Onizuka</dc:creator>
    <dc:date>2019-08-02T12:38:53Z</dc:date>
    <item>
      <title>Problem in merging using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578642#M164146</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code more than 1000 times to merge and the code never lets me down. However, now I am having a weird error sign which I can no way solve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My original code is as follows:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table C1 as&lt;BR /&gt;select a.*, b.*&lt;BR /&gt;from connection a&lt;BR /&gt;LEFT JOIN F1 b on a.ISIN = b.ISIN and a.year=b.fyear;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I get the following log report:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 559px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31473iDEA9BA671AE78C1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me in figuring out the problem? I appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 08:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578642#M164146</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2019-08-02T08:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in merging using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578674#M164164</link>
      <description>&lt;P&gt;I think (i'm not sure) that you can't say a.* AND b.*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try may be,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table C1 as
select *
from connection a, F1 b
where a.ISIN = b.ISIN
and a.year = b.year ;
quit ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have test this but may be it works to :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table C1 as
select *
from connection a
LEFT JOIN F1 b on a.ISIN = b.ISIN and a.year=b.fyear ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Aug 2019 12:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578674#M164164</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-08-02T12:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in merging using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578676#M164165</link>
      <description>&lt;P&gt;CONNECTION is a special word in SQL that has a special meaning, and it cannot be the name of a SAS data set.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;That's why the error message say it is expecting TO, you have to specify a connection TO a database.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 12:29:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578676#M164165</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-02T12:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in merging using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578678#M164166</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;CONNECTION is a special word in SQL that has a special meaning, and it cannot be the name of a SAS data set.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That's why the error message say it is expecting TO, you have to specify a connection TO a database.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I didn't know it, thanks for the learn&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 12:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578678#M164166</guid>
      <dc:creator>Onizuka</dc:creator>
      <dc:date>2019-08-02T12:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in merging using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578683#M164169</link>
      <description>&lt;P&gt;It is getting confused because of the CONNECTION TO keyword.&lt;/P&gt;
&lt;P&gt;Just use a two level name&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;from work.connection a&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or a name literal&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;from 'connection'n a&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Aug 2019 13:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578683#M164169</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-02T13:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in merging using proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578759#M164196</link>
      <description>Thank you for the solution. It has been a great help and great learning experience</description>
      <pubDate>Fri, 02 Aug 2019 15:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Problem-in-merging-using-proc-sql/m-p/578759#M164196</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2019-08-02T15:45:01Z</dc:date>
    </item>
  </channel>
</rss>

