Date: Thu, 28 Feb 2002 09:39:00 -0800
Reply-To: Nick <nick_s_downie@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nick <nick_s_downie@HOTMAIL.COM>
Organization: http://groups.google.com/
Subject: referencing sas views in sql vs data step
Content-Type: text/plain; charset=ISO-8859-1
Hi, hope u can help - I basically want to create a view of a large
dataset but also to overwrite one of its variables. I know a view
holds as many columns as you define, and that these can be called the
same name, and I know that when this is read into sql it is dealt with
differently than datastep, but how can i create a view that will
ensure a consistent approach, ie value always overwritten regardless
of where the view is used?
thanks
In this case d/set one is altered by two is not. Also NB i need to use
select * as the source dataset contains > 100 variables, and this may
be liable to change.
Test code below..
data index;
input var1 $ number;
cards;
A 2
B 3
C 4
D 9
;
run;
proc sql;
create view vindex as
select *
,99 as number
from index;
quit;
data one;
set vindex;
run;
proc sql;
create table two as select * from vindex;
quit;
|