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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 1 reply
  • 232 views
  • 0 likes
  • 2 in conversation