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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 657 views
  • 0 likes
  • 2 in conversation