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 (November 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 28 Nov 2001 11:06:38 -0500
Reply-To:   Larry Bertolini <bertolini.1@OSU.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Larry Bertolini <bertolini.1@OSU.EDU>
Organization:   Ohio State University
Subject:   Re: Using Key= to perform a table lookup
Content-Type:   text/plain; charset=us-ascii

try:

set dealseds key=dealkey/unique;

You could also accomplish this task with SQL, a merge, a PROC FORMAT, or a hash look-up. The "best" approach might depend upon the size of the two datasets.

Alistair Gordon wrote:

> Using this code: > > data spardate; > set allspar(keep=fund sedol date); > set dealseds key=dealkey; > if _iorc_=%sysrc(_dsenom) then > do; > error=0; > delete; > end; > run; > > Dealseds contains one observation per fund and sedol combination > required. Dealkey is a composite index on fund and sedol and is not > specified as unique. Allspar contains multiple instances of the same > fund and sedol but with differing dates. > > Sadly spardate only contains one observation per fund/sedol > combination and not all the obsevations from allspar. > > Can this technique be modified to output all obs from allspar where > there is a > match in dealseds? > > What other equivalent and efficient techniques might be considered in > lieu of this? > > Many thanks.


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