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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.