| Date: | Fri, 6 Nov 1998 08:53:05 -0500 |
| Reply-To: | "Qin, Fangfang" <fq87763@GLAXOWELLCOME.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | "Qin, Fangfang" <fq87763@GLAXOWELLCOME.COM> |
| Subject: | Re: Merging files |
|
| Content-Type: | text/plain |
|---|
First, you can manipulate the dataset 1 by using "Keep= var1 var2 ... " to
only keep the 42 variables
which the dataset 2 has; then concatenate the two files.
Frank Qin
MDS/Technical Operational Support
(919) 483-1082
fq87763@glaxowellcome.com
> -----Original Message-----
> From: Fearless [SMTP:feldesman@HORMELUSA.NET]
> Sent: Thursday, November 05, 1998 3:33 PM
> To: SAS-L@UGA.CC.UGA.EDU
> Subject: Merging files
>
> I have two SAS datasets that I want to merge. Dataset 1 has
> 2524 rows and 86 variables. Dataset 2 has 131 rows and 42
> variables. All 42 variables of dataset 2 are variables
> found in Dataset 1 but none of the rows have matches. I
> want to merge the two files into a 3rd file deleting all
> variables that aren't in both files so that I have one file
> with 2655 rows and 42 variables.
>
> A straightforward merge does not solve the problem. It
> concatenates the two files but doesn't delete the variables
> found in one file but not in the other. I don't do this
> kind of stuff very often and I'm not finding anything
> terribly helpful in the helpfiles or the manuals I have at
> my disposal.
>
> Any suggestions on how best to proceed?
>
> Thanks.
>
> --
> Marc "Fearless" Feldesman
>
> "Yeah, and that's why it's still a mystery to me
> Why some people live like they do
> So many nice things happenin' out there
> They never even seen the clues" Jimmy Buffett
|