Date: Fri, 23 Jul 2004 23:09:40 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Help Please
Chances of getting help are increased by using an informative Subject line.
Try this (not tested);
data want;
update have(keep = id lead1 where = (not missing(lead1) ) )
have
;
by id;
run;
There's nothing special about LEAD1. It's just a kludge to keep only one
observation per ID on the master side. I could have used any of the
satellite variables, but using LEAD1 preserves the apparent variable order.
A little more straightforward:
proc sql;
create view master as select distinct id from have order by id;
quit;
data want; update master have; by id; run;
On Fri, 23 Jul 2004 13:57:06 -0700, David Fickbohm <DavidF@HOMEGAIN.COM>
wrote:
>People,
>I am working in SAS V8.1 in a PC environment.
>I have the following data:
>
>ID LEAD1 CITY1 AMT1 LEAD2 CITY2 AMT2 LEAD3 CITY3
AMT3
>LEAD4 CITY4 AMT4
>11 B SF 111
>11 S SR 100
>11
>C SA 10
>22 B MY 112
>33 S NY 85
>
>
>I want the output to look like this:
>
>ID LEAD1 CITY1 AMT1 LEAD2 CITY2 AMT2 LEAD3 CITY3
AMT3
>LEAD4 CITY4 AMT4
>11 B SF 111 S SR 100 B
>SA 10
>22 B MY 112
>33 S NY 85
>
>All thoughts, ideas, will be greatly appreciated.
>
>Thanks
>Dave
>
>Dave Fickbohm
>Data Mining Analyst
>Homegain+
>2450 45th St.
>Emeryville, CA, 94608
>Phone 510 655 0800 ext 4151