Date: Mon, 8 Apr 2002 10:38:40 -0700
Reply-To: Sheila Whitelaw <sw75@BOXFROG.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sheila Whitelaw <sw75@BOXFROG.COM>
Organization: http://groups.google.com/
Subject: Re: Merge by range
Content-Type: text/plain; charset=ISO-8859-1
Thank you very much for all the help. I have never used SQL before in
SAS, it is very helpful. I have one more question. Consider the
following example,
Input dataset 1:
OBS ID Date1 Date2 Var1
1 65 03/01/2001 04/04/2001 M
2 65 04/01/2001 04/15/2001 B
Input dataset 2:
OBS ID Date3 Var2
1 65 03/04/2001 7
2 65 04/01/2001 8
Result:
OBS ID Var1 Var2
1 65 M 7
2 65 B 8
In dataset 2, the second record has a date that within the date range
in both record 1 and record 2 of dataset 1. I need to match it to the
record that has the latest date (in this case, record 2). Does anyone
how to do it?
Thanks again.
|