<?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: merge tables and got empty columns in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526513#M143401</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
     create table aa
	 as select a.*, b.*
	 from temp04 as a,
	 temp05 as b
	 where a.cusip=b.cusip and a.datadate=b.date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Jan 2019 22:04:44 GMT</pubDate>
    <dc:creator>VDD</dc:creator>
    <dc:date>2019-01-11T22:04:44Z</dc:date>
    <item>
      <title>Join tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526512#M143400</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to merge two tables by cusip number and date, there are no empty values in every column, but the merged table has empty columns, what are the possible reasons?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank YOU&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
     create table aa
	 as select a.*, b.*
	 from temp04 as a
	 left join temp05 as b
	 on a.cusip=b.cusip and a.datadate=b.date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 297px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26206i11CE092D71B42205/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 271px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26207i54C85CB2C2B415E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.PNG" style="width: 416px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26208iD3F285CEEF70AA8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.PNG" alt="Capture3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 23:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526512#M143400</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2019-01-11T23:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: merge tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526513#M143401</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
     create table aa
	 as select a.*, b.*
	 from temp04 as a,
	 temp05 as b
	 where a.cusip=b.cusip and a.datadate=b.date;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jan 2019 22:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526513#M143401</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-01-11T22:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: merge tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526514#M143402</link>
      <description>&lt;P&gt;Thank you for your reply, but i need temp04 left join temp05.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 22:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526514#M143402</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2019-01-11T22:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: merge tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526515#M143403</link>
      <description>&lt;P&gt;With a left join, this just means there are some mismatches ... CUSIPs and/or dates that appear in temp04 but don't appear in temp05.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inspecting the data you posted, it looks like there would be plenty of mismatches.&amp;nbsp; The result you have is not surprising.&amp;nbsp; You need an exact match on both CUSIP and DATE.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 22:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526515#M143403</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-01-11T22:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: merge tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526516#M143404</link>
      <description>&lt;P&gt;Yes, because i only need the data in temp04, temp05 is all 20-year daily data. My result shows the whole column is empty&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 22:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526516#M143404</guid>
      <dc:creator>Songchan</dc:creator>
      <dc:date>2019-01-11T22:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: merge tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526533#M143414</link>
      <description>&lt;P&gt;When you have two tables with the same variable name and you use Select a.*, b.* the value of the common named variable may not be coming from the table you expect.&lt;/P&gt;
&lt;P&gt;Try using this select and see if it helps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select a.cusip as cusipA, b.cusip as cusipB, a.*, b.*&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 23:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526533#M143414</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-11T23:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables and got empty columns</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526578#M143433</link>
      <description>&lt;P&gt;Is the format for CUSIPs the same in both datasets? It seems to have 9 characters with leading zeros in temp04 and 8 characters without leading zeros in temp05.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Jan 2019 06:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-tables-and-got-empty-columns/m-p/526578#M143433</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-01-12T06:08:24Z</dc:date>
    </item>
  </channel>
</rss>

