|
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;
|