| Date: | Thu, 13 Jul 2000 09:46:44 -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: merging problem |
|---|
This is a little difficult because the example is not very general.
Also, I'm not sure what "similar" means here.
So I make assumptions:
1. The ID values are to be equal (not "similar").
2. The ID values do not repeat. Or, at worst, they repeat in one
data set but not the other.
Then MERGE by ID alone, renaming X3 in one of the data
sets to avoid a name collision, and use a subsetting IF to
apply the date-proximity condition.
On Wed, 12 Jul 2000 17:44:17 MST, Ray Pere <raypere@NETSCAPE.NET> wrote:
>Dear Sas users: I have two data sets which are setup as shown below. I am
>trying to merge the data by id and date. The problem is that the dates need
>not be the same. Merging the data is fine as long as the ids are similar
and
>the dates can differ between two days in absolute terms. Any form advice is
>most welcome. Thanks in advance.
>
>Ray
>
>Data 1
>Id x1 x2 x3
>a 2 3 10/12/99
>b 3 4 9/25/98
>c 4 7 7/20/97
>
>Data 2
>Id z1 z2 x3
>a 4 5 10/12/99
>c 6 7 9/25/98
>d 4 8 7/20/97
>
>
>____________________________________________________________________
>Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
|