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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.