BookmarkSubscribeRSS Feed
haider_imam
Calcite | Level 5

How do you guys investigate where these additional rows came from? 

 

I tried adding a variable in one of the data sets before doing the left join 

data original_tbl_1; set table1;

testvar = 1;

run; 

 

then in the following step I do the left join

 

I thought I could just find where 1 doesn't exist after I run the left join, but it turns out all the addition rows are also filled out with testvar =1  

 

😞 

 

Any advice on how I can go about doing this? 

1 REPLY 1
tomrvincent
Rhodochrosite | Level 12
'the left join'...to what table? From what table? By what fields? No idea what the other table involved looks like...maybe it already has a testvar field in it.

Or, if you're left joining original_tbl_1 to some other table by some field(s) it isn't surprising the results would have testvar =1.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 572 views
  • 0 likes
  • 2 in conversation