BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Thalitacosta
Obsidian | Level 7

I have 2 tables (A and B) with the columns:

 

In A: Leaf, Total, Prob_A

In B: Leaf, Total, Prob_B

 

I need to join these 2 tables (in C), but when I do "full join" by "proc sql", it's returning:

 

In C: Leaf, Total, Prob_A, Prob_B

 

But only the variable "Leaf" is the key, the "Total" has diferente values.

 

How to return the "Total" from th 2 tables? Thus:

 

C: Leaf, Total_A, Total_B, Prob_A, Prob_B

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Your SELECT clause needs to be more specific, along the lines of:

 

select A.Total as Total_A, B.Total as Total_B, Prob_A, Prob_B, A.Leaf

from A, B

View solution in original post

1 REPLY 1
Astounding
PROC Star

Your SELECT clause needs to be more specific, along the lines of:

 

select A.Total as Total_A, B.Total as Total_B, Prob_A, Prob_B, A.Leaf

from A, B

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 445 views
  • 1 like
  • 2 in conversation