<?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 Proc Sql -- Join problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751580#M236605</link>
    <description>&lt;P&gt;I have a problem with a Proc SQL join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two data sets with 124,100 rows each.&amp;nbsp; Data set A has two columns:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contact_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place_of_Employment&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are no missing contact_ids be there are sparse inputs for the Place_of_Employment because not every contact provided and answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second data set Data set B has the following columns.&amp;nbsp; These are sparse also.&lt;/P&gt;
&lt;P&gt;The Place_of_employment in B matches to the Place_of-Employment in A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the columns for Dataset B:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Place_of_Employment&amp;nbsp;&amp;nbsp;&amp;nbsp; NAICS_Sector&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sector_Type&amp;nbsp;&amp;nbsp; Type_Firm&amp;nbsp;&amp;nbsp; Child_minor&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Disabled&amp;nbsp;&amp;nbsp; More_than_one_Job&amp;nbsp;&amp;nbsp; Retired&amp;nbsp;&amp;nbsp;&amp;nbsp; Unemployed__Not_working&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Work_from_home_remotely&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code&lt;/P&gt;
&lt;PRE&gt;Proc sql noprint;
CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
   Select A.*, B.*
   From SASCDC_2.Contact_Person_Employ_field AS A
   Left Join SASCDC_2.Employment_Classify AS B
   ON A.Place_of_Employment = B.Place_of_Employment;
quit;&lt;/PRE&gt;
&lt;P&gt;I would expect the query to take a few seconds but this is the result from the log&lt;/P&gt;
&lt;PRE&gt; Proc sql noprint;
39   CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
40      Select A.*, B.*
41      From SASCDC_2.Contact_Person_Employ_field AS A
42      Left Join SASCDC_2.Employment_Classify AS B
43      ON A.Place_of_Employment = B.Place_of_Employment;
WARNING: Variable Place_of_Employment already exists on file
         SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS.
NOTE: SAS threaded sort was used.
NOTE: There were 124803 observations read from the data set
      SASCDC_2.CONTACT_PERSON_EMPLOY_FIELD.
NOTE: There were 124803 observations read from the data set SASCDC_2.EMPLOYMENT_CLASSIFY.
WARNING: The data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS may be incomplete.  When this step
         was stopped there were 3036491921 observations and 11 variables.
NOTE: Compressing data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS decreased size by 90.52
      percent.
      Compressed is 1061686 pages; un-compressed would require 11204768 pages.
WARNING: Data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS was not replaced because this step was
         stopped.
NOTE: PROCEDURE SQL used (Total process time):
      real time           25:19.26
      cpu time            22:39.62


44   quit;

&lt;/PRE&gt;
&lt;P&gt;When I stopped the query 3,036,491,921 observations had been processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially all I want to do is to append the Contact_ID field from data set A to the front-end of data set B.&amp;nbsp; That is why I chose the Left Join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is some problem here if over 3 billion obs were processed and the query was no where near to completion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What changes do I have to make to just append the contact_ID field from dataset A to dataset B - I am using Place_of_Employment as the common field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wklierman&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 22:01:26 GMT</pubDate>
    <dc:creator>wlierman</dc:creator>
    <dc:date>2021-07-01T22:01:26Z</dc:date>
    <item>
      <title>Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751580#M236605</link>
      <description>&lt;P&gt;I have a problem with a Proc SQL join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two data sets with 124,100 rows each.&amp;nbsp; Data set A has two columns:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contact_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place_of_Employment&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are no missing contact_ids be there are sparse inputs for the Place_of_Employment because not every contact provided and answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second data set Data set B has the following columns.&amp;nbsp; These are sparse also.&lt;/P&gt;
&lt;P&gt;The Place_of_employment in B matches to the Place_of-Employment in A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the columns for Dataset B:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Place_of_Employment&amp;nbsp;&amp;nbsp;&amp;nbsp; NAICS_Sector&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sector_Type&amp;nbsp;&amp;nbsp; Type_Firm&amp;nbsp;&amp;nbsp; Child_minor&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Disabled&amp;nbsp;&amp;nbsp; More_than_one_Job&amp;nbsp;&amp;nbsp; Retired&amp;nbsp;&amp;nbsp;&amp;nbsp; Unemployed__Not_working&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Work_from_home_remotely&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code&lt;/P&gt;
&lt;PRE&gt;Proc sql noprint;
CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
   Select A.*, B.*
   From SASCDC_2.Contact_Person_Employ_field AS A
   Left Join SASCDC_2.Employment_Classify AS B
   ON A.Place_of_Employment = B.Place_of_Employment;
quit;&lt;/PRE&gt;
&lt;P&gt;I would expect the query to take a few seconds but this is the result from the log&lt;/P&gt;
&lt;PRE&gt; Proc sql noprint;
39   CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
40      Select A.*, B.*
41      From SASCDC_2.Contact_Person_Employ_field AS A
42      Left Join SASCDC_2.Employment_Classify AS B
43      ON A.Place_of_Employment = B.Place_of_Employment;
WARNING: Variable Place_of_Employment already exists on file
         SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS.
NOTE: SAS threaded sort was used.
NOTE: There were 124803 observations read from the data set
      SASCDC_2.CONTACT_PERSON_EMPLOY_FIELD.
NOTE: There were 124803 observations read from the data set SASCDC_2.EMPLOYMENT_CLASSIFY.
WARNING: The data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS may be incomplete.  When this step
         was stopped there were 3036491921 observations and 11 variables.
NOTE: Compressing data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS decreased size by 90.52
      percent.
      Compressed is 1061686 pages; un-compressed would require 11204768 pages.
WARNING: Data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS was not replaced because this step was
         stopped.
NOTE: PROCEDURE SQL used (Total process time):
      real time           25:19.26
      cpu time            22:39.62


44   quit;

&lt;/PRE&gt;
&lt;P&gt;When I stopped the query 3,036,491,921 observations had been processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially all I want to do is to append the Contact_ID field from data set A to the front-end of data set B.&amp;nbsp; That is why I chose the Left Join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is some problem here if over 3 billion obs were processed and the query was no where near to completion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What changes do I have to make to just append the contact_ID field from dataset A to dataset B - I am using Place_of_Employment as the common field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wklierman&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 22:01:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751580#M236605</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-01T22:01:26Z</dc:date>
    </item>
    <item>
      <title>Proc Sql--Join Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751581#M236632</link>
      <description>&lt;DIV class="forum-topic-flex-article"&gt;
&lt;DIV class="forum-article"&gt;
&lt;DIV class="forum-subj-action"&gt;
&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;
&lt;DIV class="MessageSubject"&gt;
&lt;DIV class="MessageSubjectIcons "&gt;
&lt;DIV class="lia-message-subject"&gt;Proc Sql -- Join problem&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="forum-post"&gt;
&lt;DIV class="post-info"&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/td-p/751580" target="_blank"&gt; &lt;SPAN class="message-date-friendly" title="Posted by wlierman  
 07-01-2021 06:01 PM"&gt;Posted 2 seconds ago&lt;/SPAN&gt; &lt;/A&gt; &lt;SPAN class="message-date-views"&gt;(0 views)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV id="bodyDisplay_5cb05612571461" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;I have a problem with a Proc SQL join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two data sets with 124,100 rows each.&amp;nbsp; Data set A has two columns:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contact_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place_of_Employment&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are no missing contact_ids be there are sparse inputs for the Place_of_Employment because not every contact provided and answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second data set Data set B has the following columns.&amp;nbsp; These are sparse also.&lt;/P&gt;
&lt;P&gt;The Place_of_employment in B matches to the Place_of-Employment in A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the columns for Dataset B:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Place_of_Employment&amp;nbsp;&amp;nbsp;&amp;nbsp; NAICS_Sector&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sector_Type&amp;nbsp;&amp;nbsp; Type_Firm&amp;nbsp;&amp;nbsp; Child_minor&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Disabled&amp;nbsp;&amp;nbsp; More_than_one_Job&amp;nbsp;&amp;nbsp; Retired&amp;nbsp;&amp;nbsp;&amp;nbsp; Unemployed__Not_working&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Work_from_home_remotely&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the following code&lt;/P&gt;
&lt;PRE&gt;Proc sql noprint;
CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
   Select A.*, B.*
   From SASCDC_2.Contact_Person_Employ_field AS A
   Left Join SASCDC_2.Employment_Classify AS B
   ON A.Place_of_Employment = B.Place_of_Employment;
quit;&lt;/PRE&gt;
&lt;P&gt;I would expect the query to take a few seconds but this is the result from the log&lt;/P&gt;
&lt;PRE&gt; Proc sql noprint;
39   CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
40      Select A.*, B.*
41      From SASCDC_2.Contact_Person_Employ_field AS A
42      Left Join SASCDC_2.Employment_Classify AS B
43      ON A.Place_of_Employment = B.Place_of_Employment;
WARNING: Variable Place_of_Employment already exists on file
         SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS.
NOTE: SAS threaded sort was used.
NOTE: There were 124803 observations read from the data set
      SASCDC_2.CONTACT_PERSON_EMPLOY_FIELD.
NOTE: There were 124803 observations read from the data set SASCDC_2.EMPLOYMENT_CLASSIFY.
WARNING: The data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS may be incomplete.  When this step
         was stopped there were 3036491921 observations and 11 variables.
NOTE: Compressing data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS decreased size by 90.52
      percent.
      Compressed is 1061686 pages; un-compressed would require 11204768 pages.
WARNING: Data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS was not replaced because this step was
         stopped.
NOTE: PROCEDURE SQL used (Total process time):
      real time           25:19.26
      cpu time            22:39.62


44   quit;

&lt;/PRE&gt;
&lt;P&gt;When I stopped the query 3,036,491,921 observations had been processed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially all I want to do is to append the Contact_ID field from data set A to the front-end of data set B.&amp;nbsp; That is why I chose the Left Join.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is some problem here if over 3 billion obs were processed and the query was no where near to completion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What changes do I have to make to just append the contact_ID field from dataset A to dataset B - I am using Place_of_Employment as the common field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wklierman&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="kudosButtonV2" class="KudosButton lia-button-image-kudos-wrapper lia-component-kudos-widget-button-version-3 lia-component-kudos-widget-button-horizontal lia-component-kudos-widget-button lia-component-kudos-action lia-component-message-view-widget-kudos-action" data-lia-kudos-id="751580"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-main"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="AddMessageTags lia-message-tags lia-component-message-view-widget-tags"&gt;&lt;A id="showAddTag" class="lia-link-navigation add-tag-link" role="button" href="https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751580#" aria-label="Add Tag..." target="_blank"&gt;Add tags&lt;/A&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Jul 2021 22:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751581#M236632</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-01T22:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751582#M236607</link>
      <description>&lt;P&gt;Sparse data can cause this. Each missing in data set A is matched with each missing in data set B, in effect a Cartesian join of all records where Place_of_Employment is missing in both data sets. Instead, try this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;From SASCDC_2.Contact_Person_Employ_field(where=(not missing(place_of_employment))) AS A
   Left Join SASCDC_2.Employment_Classify(where=(not missing(place_of_employment))) AS B&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 22:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751582#M236607</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-01T22:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql--Join Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751584#M236633</link>
      <description>&lt;P&gt;DUPLICATE THREAD&lt;/P&gt;
&lt;P&gt;Do not reply in this thread&lt;/P&gt;
&lt;P&gt;Reply here: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/td-p/751580/jump-to/first-unread-message" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/td-p/751580/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 22:11:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751584#M236633</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-01T22:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751591#M236615</link>
      <description>&lt;P&gt;Thank you for responding.&amp;nbsp; This how I altered the code with your code.&lt;/P&gt;
&lt;PRE&gt;Proc sql noprint;
CREATE TABLE SASCDC_2.Contact_ID_Employment_NAICS AS
   Select A.*, B.*
   From SASCDC_2.Contact_Person_Employ_field(where=(not missing(place_of_employment))) AS A
   Left Join SASCDC_2.Employment_Classify(where=(not missing(place_of_employment))) AS B
   ON A.Place_of_Employment = B.Place_of_Employment;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I still got over 11MM obs as can be seen in the log.&lt;/P&gt;
&lt;PRE&gt; Select A.*, B.*
48      From SASCDC_2.Contact_Person_Employ_field(where=(not missing(place_of_employment))) AS
48 ! A
49      Left Join SASCDC_2.Employment_Classify(where=(not missing(place_of_employment))) AS B
50      ON A.Place_of_Employment = B.Place_of_Employment;
WARNING: Variable Place_of_Employment already exists on file
         SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS.
NOTE: SAS threaded sort was used.
NOTE: Compressing data set SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS decreased size by 87.73
      percent.
      Compressed is 5015 pages; un-compressed would require 40858 pages.
NOTE: Table SASCDC_2.CONTACT_ID_EMPLOYMENT_NAICS created, with 11072295 rows and 11 columns.

51   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           5.89 seconds
      cpu time            5.54 seconds

&lt;/PRE&gt;
&lt;P&gt;Need some additional modification.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wklierman&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 23:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751591#M236615</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-01T23:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751601#M236619</link>
      <description>&lt;P&gt;Bottom line: Know your data.&lt;/P&gt;
&lt;P&gt;You need to figure out which values have a high cardinality (repeated values) and cause the large Cartesian product.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 04:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751601#M236619</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-07-02T04:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751607#M236622</link>
      <description>&lt;P&gt;You should leave those two tables separate unless there is a field matching Contact_ID in table Employment_Classify to do the join on.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 01:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751607#M236622</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2021-07-02T01:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql--Join Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751626#M236634</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;DUPLICATE THREAD&lt;/P&gt;
&lt;P&gt;Do not reply in this thread&lt;/P&gt;
&lt;P&gt;Reply here: &lt;A href="https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/td-p/751580/jump-to/first-unread-message" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/td-p/751580/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Merged.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 06:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751626#M236634</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-02T06:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751630#M236635</link>
      <description>&lt;P&gt;Since there is only one possible variable for matching, and that variable has non-missing multiples in both datasets, i think this is an impossible task, as you cannot determine which contact_id should be matched to a given observation in&amp;nbsp;Employment_Classify. If a place of employment has 1000 entries in each dataset, you get a million results, 99.9% of which are wrongly matched. You need to dig further for some fact that allows one-to-one matching.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 06:58:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751630#M236635</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-02T06:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751818#M236726</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; You are right. It can't be accomplished.&amp;nbsp; So I did it the old fashion way.&lt;/P&gt;
&lt;P&gt;Exported only the contact_person_id to an xlsx worksheet. Then I copy / pasted the employment data (which had been exported earlier to an xlsx worksheet) to the contact_person_id and I have the dataset that I needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I should have thought of that work-around before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you all for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wklierman&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 19:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751818#M236726</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2021-07-02T19:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql -- Join problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751820#M236728</link>
      <description>&lt;P&gt;If the order of both datasets is already correct, then a MERGE without BY can also do that side-by-side lineup.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 20:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Join-problem/m-p/751820#M236728</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-02T20:00:43Z</dc:date>
    </item>
  </channel>
</rss>

