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

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

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
  • 838 views
  • 1 like
  • 2 in conversation