<?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: JOINING OF TABLES in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513482#M32533</link>
    <description>&lt;P&gt;So, first of all, you have several syntax errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. No closing comma on the libname statement;&lt;/P&gt;&lt;P&gt;2. No comma after&amp;nbsp;&lt;SPAN&gt;b.Loannumber;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. No alias set for&amp;nbsp;b.Name and a.Lineavailable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. "INNER JOIN AUTOLOAD.DIM_ACCOUNT f ON g.AccountNumber = g.AccountNumber" --&amp;gt; this whole line is strange as you're trying to make an inner join after several left joins (good luck&amp;nbsp;controlling that!) of the table aliased as f but on a variable of table g (which does not exist in your query) with itself (!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. Speaking of table aliased as g, despite not existing in your query, you're trying to get two variables (g.QATPostingDate, g.SICCodeValue81)) of it! And you're ending that line with a closing parenthesis that doesn't have a "companion" opening anywhere in your query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6. The&amp;nbsp;QUIT; before the where can't be there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, first solve all these issues, and then post clearly what is missing from your requirements.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2018 17:45:43 GMT</pubDate>
    <dc:creator>José_Costa_biw</dc:creator>
    <dc:date>2018-11-15T17:45:43Z</dc:date>
    <item>
      <title>JOINING OF TABLES</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513440#M32528</link>
      <description>&lt;DIV&gt;libname Autoload 'F:\sasdata\data\autoload\report;&lt;BR /&gt;proc sql ;&lt;BR /&gt;create table test as&lt;BR /&gt;Select&lt;BR /&gt;&amp;nbsp;b.NAICSCode ,&lt;BR /&gt;&amp;nbsp;b.Callreportcode ,&lt;BR /&gt;&amp;nbsp;b.Loannumber&amp;nbsp;&lt;BR /&gt;&amp;nbsp;b.Name as ,&lt;BR /&gt;&amp;nbsp;a.Currentprincipalbalance ,&lt;BR /&gt;&amp;nbsp;a.Lineavailable as ,&lt;BR /&gt;&amp;nbsp;sum(a.Currentprincipalbalance,a.Lineavailable) as Commitment_Amount format=comma15.2,&lt;BR /&gt;&amp;nbsp;c.Officername,&lt;BR /&gt;&amp;nbsp;e.BranchMarketDescription,&lt;BR /&gt;f.AccountNumber,&lt;BR /&gt;g.QATPostingDate,&lt;BR /&gt;g.SICCodeValue81&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;from Autoload.NEW_Loan_Balance a&lt;BR /&gt;left join Autoload.DIM_LOAN b on a.Accountkey=b.Accountkey&lt;BR /&gt;left join Autoload.DIM_OFFICER c on b.OfficerKey=c.Officerkey&lt;BR /&gt;left join Autoload.DIM_BRANCH_COST_CENTER d on b.branchcostcenterkey=d.branchcostcenterkey&lt;BR /&gt;left join Autoload.DIM_BRANCH_MARKET e on e.BRANCHMARKETKEY=d.BRANCHMARKETKEY&lt;BR /&gt;INNER JOIN AUTOLOAD.DIM_ACCOUNT f ON g.AccountNumber = g.AccountNumber);&lt;BR /&gt;QUIT;&lt;BR /&gt;where&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; SICCode55=Y&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;quit;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;I had to add&amp;nbsp; match the LOANSPECIALINFOCODEHISTORYWIDE table (where QATPostingDate = “YYYY-MM-DD” (last business day of whatever month you are using) and SICCodeValue55=Y) and join to DIM_ACCOUNT by AccountNumber to get the AccountKey.&amp;nbsp; Then you could match to NEW_LOAN_BALANCE by AccountKey to get the correct loans. &amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513440#M32528</guid>
      <dc:creator>Sultana</dc:creator>
      <dc:date>2018-11-15T16:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: JOINING OF TABLES</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513458#M32530</link>
      <description>&lt;P&gt;It is not so clear what your trying to do here, please try to provide a sample data and your required result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your trying to run the same query you posted then make sure you have the quotes for the file path in the Libname statement and remove the quit before where clause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513458#M32530</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-11-15T17:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: JOINING OF TABLES</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513459#M32531</link>
      <description>&lt;P&gt;Can you show us an example of what your data looks like? Makes it much easier to help you.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:17:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513459#M32531</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-11-15T17:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: JOINING OF TABLES</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513482#M32533</link>
      <description>&lt;P&gt;So, first of all, you have several syntax errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. No closing comma on the libname statement;&lt;/P&gt;&lt;P&gt;2. No comma after&amp;nbsp;&lt;SPAN&gt;b.Loannumber;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. No alias set for&amp;nbsp;b.Name and a.Lineavailable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. "INNER JOIN AUTOLOAD.DIM_ACCOUNT f ON g.AccountNumber = g.AccountNumber" --&amp;gt; this whole line is strange as you're trying to make an inner join after several left joins (good luck&amp;nbsp;controlling that!) of the table aliased as f but on a variable of table g (which does not exist in your query) with itself (!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. Speaking of table aliased as g, despite not existing in your query, you're trying to get two variables (g.QATPostingDate, g.SICCodeValue81)) of it! And you're ending that line with a closing parenthesis that doesn't have a "companion" opening anywhere in your query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6. The&amp;nbsp;QUIT; before the where can't be there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, first solve all these issues, and then post clearly what is missing from your requirements.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/JOINING-OF-TABLES/m-p/513482#M32533</guid>
      <dc:creator>José_Costa_biw</dc:creator>
      <dc:date>2018-11-15T17:45:43Z</dc:date>
    </item>
  </channel>
</rss>

