Hi SAS Community,
I'm having a problem trying to combine 20 datasets using proc sql. I can do it in a datastep, but is it possible to do with proc sql?
data want;
set have_: ; /*all of my datasets begin with have_*/ /*For instance, have_01, have_02, have_03....etc */
if dc_code = "" then total = total +1;
run;
Is it possible to perform this same procedure using proc sql?
Thanks
Is it possible to perform this same procedure using proc sql?
Thanks
No because Proc sql doesn't support variable/dataset name lists. You could perhaps generate sql union operator statements in a macro or using call execute reading dictionary tables, but that's rather tedious.
Is it possible to perform this same procedure using proc sql?
Thanks
No because Proc sql doesn't support variable/dataset name lists. You could perhaps generate sql union operator statements in a macro or using call execute reading dictionary tables, but that's rather tedious.
Is it possible to perform this same procedure using proc sql?
It's possible by listing out the tables or creating a macro that unions all the tables.
Is it efficient or practical to do so? Not really.
@belboy wrote:
Hi SAS Community,
I'm having a problem trying to combine 20 datasets using proc sql. I can do it in a datastep, but is it possible to do with proc sql?
data want;
set have_: ; /*all of my datasets begin with have_*/ /*For instance, have_01, have_02, have_03....etc */
if dc_code = "" then total = total +1;
run;
Is it possible to perform this same procedure using proc sql?
Thanks
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: