<?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: PROC SQL CREATE TABLE in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69033#M19782</link>
    <description>Thanks! That does help!</description>
    <pubDate>Wed, 14 Jan 2009 16:26:27 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-01-14T16:26:27Z</dc:date>
    <item>
      <title>PROC SQL CREATE TABLE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69031#M19780</link>
      <description>Hi, I am trying to join two tables. Table A has fewer observations than Table B.&lt;BR /&gt;
I only want the additional information from table B added to Table A.  &lt;BR /&gt;
I am getting, according to the log, 1 fewer observation in the new table named&lt;BR /&gt;
CHARTER than in the original table I wanted to add an additional field to from Table B.  Why?&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
CREATE TABLE CHARTER AS&lt;BR /&gt;
SELECT &lt;BR /&gt;
	A.COCODE,&lt;BR /&gt;
	A.COUNTY,&lt;BR /&gt;
	A.DISTRICT,&lt;BR /&gt;
	A.ENROLLMENT,&lt;BR /&gt;
	A.SCHOOL,&lt;BR /&gt;
	A.SCHOOL_CODE,&lt;BR /&gt;
	A.TYPE,&lt;BR /&gt;
	B.CHARTER,&lt;BR /&gt;
	B.DIST_CODE,&lt;BR /&gt;
	B.PHYS_CITY&lt;BR /&gt;
	FROM CHECK A INNER JOIN KINDER B&lt;BR /&gt;
		ON (A.SCHOOL_CODE=B.SCH_CODE);&lt;BR /&gt;
QUIT;</description>
      <pubDate>Wed, 14 Jan 2009 00:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69031#M19780</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-14T00:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL CREATE TABLE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69032#M19781</link>
      <description>.....&lt;BR /&gt;
from check a LEFT JOIN kinder B&lt;BR /&gt;
.....&lt;BR /&gt;
&lt;BR /&gt;
A INNER JOIN gives you only the rows with common keys in both tables.&lt;BR /&gt;
If table A has a row where the key doesn't match with table B then this row won't be part of the result table.&lt;BR /&gt;
&lt;BR /&gt;
Use a left join and you won't loose rows from table A (but of course: one row in the result table will have missings for all vars coming from table B).&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Wed, 14 Jan 2009 10:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69032#M19781</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-01-14T10:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL CREATE TABLE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69033#M19782</link>
      <description>Thanks! That does help!</description>
      <pubDate>Wed, 14 Jan 2009 16:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SQL-CREATE-TABLE/m-p/69033#M19782</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-14T16:26:27Z</dc:date>
    </item>
  </channel>
</rss>

