Date: Wed, 8 Feb 2006 09:40:36 +0000
Reply-To: Guido T <cymraeg_erict@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Guido T <cymraeg_erict@HOTMAIL.COM>
Subject: Re: Replacing variable values with proc sql
Content-Type: text/plain; charset="iso-8859-1"
> Date: Wed, 8 Feb 2006 04:25:49 -0500> From: dassybr@HOTMAIL.COM> Subject: Re: Replacing variable values with proc sql> To: SAS-L@LISTSERV.UGA.EDU> > Thanks for your comment!> The problem is that I have a dataset with many variables and it would be> crazy to list them all. So if I do:> > create table test;> select *, case> when cc is missing then 'Missing'> from dataset;> quit;> > I get a warning that cc already exists in the dataset(which is correct) and> the missing value of cc is not replaced.> (Bummer...)> > Any comments on that ;-)?
Hi Hadassa,
I would usually use something like ...
create table test(drop=oldcc) as
select *
, case
when oldcc is missing then 'Missing!'
else oldcc
end as cc length=20
from dataset(rename=(cc=oldcc))
;
Tho' I'm sure there is a better way.
Regards
++ Guido
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |