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

Hello,

 

I have a very basic question but something seems to be wrong with my code.

I would like to merge 3 data sets (Out_1, Out_2, Out_3, please see below). All have exactly the same structure (variables) and I would like to create a merged table that includes all 3 datasets.

 

I have tried the following code:

Data final;
Merge Out_1 Out_2 Out_3;
Run;

There seems to be something wrong with it because the merged file only includes the information from Out_3.

 

I would be very glad if someone could help me out.

 

Many thanks,

 

Tim

 

 

 

Model.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

It sounds like you want SET and not MERGE.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

It sounds like you want SET and not MERGE.

--
Paige Miller
Tim_sas_
Obsidian | Level 7

Many thanks PaigeMiller, this solved my problem!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 649 views
  • 1 like
  • 2 in conversation