LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 6 Aug 2009 13:11:50 -0400
Reply-To:   Paul Dorfman <sashole@BELLSOUTH.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Paul Dorfman <sashole@BELLSOUTH.NET>
Subject:   Re: hash problematic
Comments:   To: RamsamyAshley@GMAIL.COM
Content-Type:   text/plain; charset=ISO-8859-1

Ash007,

Well, now *this* is easy to remedy:

data jointure_bidon_h (keep = x1 w2) ; if _n_ = 1 then do ; if 0 then set table_bidon1 table_bidon2 ; dcl hash h (dataset: "table_bidon2") ; h.definekey ("w1") ; h.definedata ("w2") ; h.definedone () ; end ;

set table_bidon1 ;

if h.find (key: x1) ne 0 then call missing (w2) ; run ;

Kind regards ------------ Paul Dorfman Jax, FL ------------

On Thu, 6 Aug 2009 02:57:04 -0700, ash007 <RamsamyAshley@GMAIL.COM> wrote:

>thanks for your advice. > >i want to transform the left join to hash code please. thanks. ash007. > > >data table_bidon1; > input x1 x2 x3 x4 x5 $; cards; > 1 5 5 1161 ab鬩en > 2 5 5 1161 ab鬩en > 3 6 3 1336 alm鲩c > 4 1 5 1499 aniel > ; >run; > >data table_bidon2; > input w1 w2 w3 w4 w5 $; cards; > 3 6 3 1336 alm鲩c > 4 1 5 1499 aniel > 5 6 3 1336 alm鲩c > 6 1 5 1499 aniel > ; >run; > >proc sql; > create table jointure_bidon as > select a.x1,b.w2 > from table_bidon1 as a > left join table_bidon2 as b > on a.x1 = b.w1 > ; >quit;


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