BookmarkSubscribeRSS Feed
DSivic
Calcite | Level 5
Hi everyone, first visit to the forums!

I am doing a left join on two data sets and there are common data fields (other than the ones I'm joining on) in the two sets of data. Some of these common fields may not have the same data, though. I am wondering if when I left join data set B on data set A which of the common fields it will keep the data from, A or B?

proc sql;
create table edm_spg as
select a.*, b.*
from edm_spg a left join &tblout. b
on a.loan_number=b.loan_number and a.ldate=b.ldate;
quit;
run;


Thanks!
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
From the SAS support http://support.sas.com/ website:

Exploring PROC SQL® Joins and Join Algorithms
Kirk Paul Lafler, Software Intelligence Corporation, Spring Valley, California
http://support.sas.com/resources/papers/proceedings09/035-2009.pdf

TS-553, SQL Joins -- The Long and The Short of It
Paul Kent, SAS Institute Inc.
http://support.sas.com/techsup/technote/ts553.html


Scott Barry
SBBWorks, Inc.
DSivic
Calcite | Level 5
Thanks!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 789 views
  • 0 likes
  • 2 in conversation