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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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