how to Create a view from the view.?
how to Create a data set from the view.?
@BrahmanandaRao wrote:
Can we update (add column ,rename of variables etc.,) view and index in sas
Think a little about it:
A view takes one or more datasets, possibly combines the data, and possibly applies logic to the data.
Can you think of a way to reverse-engineer the input data from a change in the end result without a VERY serious programming effort?
So the answer is a plain NO.
But you can describe the view, both data step and SQL, and then use that as a base for changed code:
data class / view=class;
set sashelp.class;
rate = weight / Height;
run;
data view=class;
describe;
run;
proc sql;
create view class as
select
*,
weight / height as rate
from sashelp.class
;
quit;
proc sql;
describe view class;
quit;
Suppose you have a data set named WORK.HAVE.
create a view by - input can be either a data set or a view
data my_view / view=my_view;
set have;
/* add any sas code */
run;
Create a data set from a view:
data new;
set my_view;
run;
@BrahmanandaRao wrote:
Can we update (add column ,rename of variables etc.,) view and index in sas
Think a little about it:
A view takes one or more datasets, possibly combines the data, and possibly applies logic to the data.
Can you think of a way to reverse-engineer the input data from a change in the end result without a VERY serious programming effort?
So the answer is a plain NO.
But you can describe the view, both data step and SQL, and then use that as a base for changed code:
data class / view=class;
set sashelp.class;
rate = weight / Height;
run;
data view=class;
describe;
run;
proc sql;
create view class as
select
*,
weight / height as rate
from sashelp.class
;
quit;
proc sql;
describe view class;
quit;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.