BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi

In SAS ,how can we combine two data sets horizontally, vertically using Proc sql.(SAS)


regards
rupa
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
This question does not fall into the ODS category or the Base Report procedure category.

There are several ways to do data manipulation on your data sets. PROC SQL uses join operators, like OUTER UNION CORRESPONDING, LEFT JOIN, RIGHT JOIN, FULL JOIN in order to bring data sets or tables together.

In the SAS documentation, there is a main section for "The SQL Procedure". Underneath that topic are two sub-topics, entitled
--PROC SQL and the ANSI Standard
--query-expression (yes, the topic is all lower case)
which describes the various set operators that you can use to bring your tables together. If reading the PROC SQL documentation does not help, then you might consider contacting Tech Support. You can explain your specific task and they can help you with the code.

cynthia

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