|
Zach,
Here is one metho dusing SQL, but there are many and even this SQL
solution isn't as elegant as one that say SIG or Howard would cook up.
proc sql;
create table c (drop = btime) as
select a.time as atime , b.time as btime
from a as a ,
b as b
where ((btime - 1) <= atime <= (btime + 1));
quit;
HTH
Toby Dunn
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Zach Peery
Sent: Tuesday, December 07, 2004 12:44 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Simple data querying problem
Hi All,
Sorry about the last post - it seemed to want to send itself. in the
meanwhile - I thought of a better way to explain the problem...
I am trying to identify observations in dataset A that occured within 1
hour of any observation in dataset B, and place these observations in a
new dataset. Note that time is in hh.hh format such that 13.50 = 1:30
pm.
DATASET A
time
9.00
13.00
14.00
21.00
DATASET B
time
9.25
13.50
23.00
DESIRED DATASET
time1
9.00
13.00
14.00
Thanks, I really appreciate any help that the list can provide. Zach
|