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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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