I just did a data set option but I don't want the data to be placed on different rows. I have 12 tables that all have 1 row with 4 columns of monetary data. I did the following data step:
data all; set t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12;
run;
my all table now has 12 rows and 16 columns. How can I get it to have 1 row and 16 columns? All the columns have different names so I know what value came from where. Should I do a proc transpose or maybe I should just do a proc sql and create a table?
The SET statement basically tells SAS to add the data from the separate data sets after each other.
It sounds like you may have wanted to use MERGE instead of set.
The SET statement basically tells SAS to add the data from the separate data sets after each other.
It sounds like you may have wanted to use MERGE instead of set.
Yep. I needed a merge. Thanks
You could use:
data all;
set t1;
set t2;
set t3;
set t4;
set t5;
set t6;
set t7;
set t8;
set t9;
set t10;
set t11;
set t12;
run;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.