Hello group. I am new to SAS and am trying to figure out the best way to split a table into multiple files. I got the code to select distinct values in a row as well as the count of distinct items in a row. Ultimately I would like to export all columns related to a unique value in the "make" column into a file with the same name as the "make". I would like to perform this for each unique "make" in the data set. For example query SASHELP.CARS and export out all Acura info to the Acura file, Honda info to the Honda file, Chevy info to the Chevy file, etc.... /*counts unique*/
PROC SQL;
SELECT count(distinct(Make)) into :makecount FROM SASHELP.CARS;
quit;
%put &makecount;
/*creates single column table using only unique names*/
proc sql;
Create table Work.query as
select distinct(Make) from SASHELP.CARS;
run;
quit;
... View more