<?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: INNER JOINS of more than two tables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786838#M32245</link>
    <description>&lt;P&gt;Try it and see if it what you want. It will mean your row count will match the number of rows selected from your first table.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 21:09:41 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-12-20T21:09:41Z</dc:date>
    <item>
      <title>INNER JOINS of more than two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786814#M32238</link>
      <description>&lt;P&gt;Attempting to JOIN 10 tables, but having trouble Joining 3 and want to know what I am doing incorrectly? the code in RED is what I added (in steps) to add another table, but I get NO data back in the data set.&amp;nbsp; If I leave this out, I get data back.&lt;/P&gt;&lt;P&gt;Using: SAS EG Version 7.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C&lt;U&gt;&lt;STRONG&gt;ode is below&lt;/STRONG&gt;&lt;/U&gt;:&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL outobs=40;&lt;BR /&gt;CREATE TABLE Funding_Data_Table_001 AS&lt;BR /&gt;SELECT&lt;BR /&gt;FA.FINANCIAL_ACCOUNT_NUMBER&lt;BR /&gt;/*,CT.ROW_WID&lt;BR /&gt;,CT.FIRST_NAME&lt;BR /&gt;,CT.LAST_NAME&lt;BR /&gt;,CT.TIME_ZONE */&lt;BR /&gt;,FA.STATUS&lt;BR /&gt;,FA.ROW_WID&lt;BR /&gt;,FA.ACCOUNT_NUMBER&lt;BR /&gt;,LO.CR_SCOR&lt;BR /&gt;,LO.PRCSS_MO&lt;BR /&gt;,LO.PRCSS_YR&lt;BR /&gt;,LO.DLNQNT_30_59_CN&lt;BR /&gt;,LO.DLNQNT_10_29_CN&lt;BR /&gt;,LO.DLNQNT_60_89_CN&lt;BR /&gt;,LO.DLNQNT_90_CN&lt;BR /&gt;,LO.OS_AMT_D&lt;BR /&gt;,LO.CUST&lt;BR /&gt;,LO.MK&lt;BR /&gt;,LO.MDL&lt;BR /&gt;,LO.MDL_YR&lt;BR /&gt;,LO.MDL_D&lt;BR /&gt;,LO.DPD_NB as dys_pymnt_pst_due&lt;BR /&gt;,LO.BOOK_DT&lt;BR /&gt;,LO.MDL_YR_D&lt;BR /&gt;,LO.VIN&lt;BR /&gt;,LO.REPO_DT&lt;BR /&gt;,LO.CHRGOF_AM&lt;BR /&gt;,LO.LN_BAL&lt;BR /&gt;/* ABOVE AND BELOW, IS THE STATE CODES FROM BOTH TABLES AS A CROSS CHECK */&lt;BR /&gt;,FA.CUSTOMER_STATE_CODE&lt;BR /&gt;,LO.CSTMR_ST_CD&lt;BR /&gt;,FA.ACCOUNT_NUMBER&lt;BR /&gt;FROM OBII.FINANCIAL_ACCOUNT FA&lt;BR /&gt;INNER JOIN OBII.DW_LOAN LO&lt;BR /&gt;ON FA.ACCOUNT_NUMBER=LO.CUST&lt;BR /&gt;AND LO.BK = FA.BANK_CODE&lt;BR /&gt;AND LO.BR = FA.BRANCH_CODE&lt;BR /&gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;INNER JOIN OBII.CONTACT CT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;ON FA.ROW_WID = CT.ROW_WID&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;WHERE PRCSS_YR = 2021&lt;BR /&gt;AND PRCSS_MO =11&lt;BR /&gt;AND BOOK_DT BETWEEN '01JAN2021'D AND '01JUN2021'D;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 19:25:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786814#M32238</guid>
      <dc:creator>jgarces</dc:creator>
      <dc:date>2021-12-20T19:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOINS of more than two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786819#M32239</link>
      <description>&lt;P&gt;That means&amp;nbsp;OBII.CONTACT has no rows matching on&amp;nbsp;ROW_WID for the result set you have built from the other tables. If you want the result set to have rows regardless of whether the joining table is contributing rows or not then use a LEFT JOIN rather than an INNER JOIN.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 19:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786819#M32239</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-12-20T19:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOINS of more than two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786821#M32240</link>
      <description>&lt;P&gt;I will give that a shot and thank you for your input.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely,&amp;nbsp; JGarces&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 19:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786821#M32240</guid>
      <dc:creator>jgarces</dc:creator>
      <dc:date>2021-12-20T19:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOINS of more than two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786823#M32241</link>
      <description>REPLACE ALL the INNER JOINS with LEFT JOINS, or the one that is highlighted in RED?</description>
      <pubDate>Mon, 20 Dec 2021 19:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786823#M32241</guid>
      <dc:creator>jgarces</dc:creator>
      <dc:date>2021-12-20T19:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOINS of more than two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786838#M32245</link>
      <description>&lt;P&gt;Try it and see if it what you want. It will mean your row count will match the number of rows selected from your first table.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/INNER-JOINS-of-more-than-two-tables/m-p/786838#M32245</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-12-20T21:09:41Z</dc:date>
    </item>
  </channel>
</rss>

