<?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: why is libref not required for On clause in Proc SQL ? in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743894#M769</link>
    <description>&lt;P&gt;In an ON clause you are referencing VARIABLES, not DATASETS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So depending where you use X.Y it means different things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SQL code referencing a variable the X value (called an ALIAS) specifies the dataset and the Y value specifies the variable in that dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS code referencing a dataset the X value (called a LIBREF) specifies the library and the Y value specifies the dataset (called a MEMBER) in that library.&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 14:40:43 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-05-26T14:40:43Z</dc:date>
    <item>
      <title>why is libref not required for On clause in Proc SQL ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743870#M767</link>
      <description>&lt;P&gt;While querying the data using Proc SQL from two tables without using aliases, the program seems to run fine without using libref in On clause. How does SAS recognize if the table we are referring to is from work or a particular library(pg1 in the below example)?&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select Season, Name, storm_summary.Basin, BasinName, MaxWindMPH&lt;BR /&gt;from pg1.storm_summary inner join pg1.storm_basincodes&lt;BR /&gt;on storm_summary.Basin = storm_basincodes.Basin&lt;BR /&gt;order by Season desc, Name;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 13:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743870#M767</guid>
      <dc:creator>palvani</dc:creator>
      <dc:date>2021-05-26T13:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: why is libref not required for On clause in Proc SQL ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743892#M768</link>
      <description>The ON clause can only access tables from the FROM clause.  In your example, pg1.storm_summary and pg1.storm_basinCodes are the only tables the ON clause considers</description>
      <pubDate>Wed, 26 May 2021 14:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743892#M768</guid>
      <dc:creator>Al14</dc:creator>
      <dc:date>2021-05-26T14:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: why is libref not required for On clause in Proc SQL ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743894#M769</link>
      <description>&lt;P&gt;In an ON clause you are referencing VARIABLES, not DATASETS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So depending where you use X.Y it means different things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SQL code referencing a variable the X value (called an ALIAS) specifies the dataset and the Y value specifies the variable in that dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS code referencing a dataset the X value (called a LIBREF) specifies the library and the Y value specifies the dataset (called a MEMBER) in that library.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 14:40:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743894#M769</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-26T14:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: why is libref not required for On clause in Proc SQL ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743920#M770</link>
      <description>&lt;P&gt;If you were joining datasets with the &lt;EM&gt;same name&lt;/EM&gt; from different libraries, then you would have to define aliases in the FROM clause and use these in the ON.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 15:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/why-is-libref-not-required-for-On-clause-in-Proc-SQL/m-p/743920#M770</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-26T15:20:39Z</dc:date>
    </item>
  </channel>
</rss>

