LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 7 Dec 2004 13:01:30 -0600
Reply-To:   "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Subject:   Re: Simple data querying problem
Comments:   To: Zach Peery <zpeery@NATURE.BERKELEY.EDU>
Content-Type:   text/plain; charset="us-ascii"

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


Back to: Top of message | Previous page | Main SAS-L page