without knowing more about the table layouts... You could also create a view. Depending on the size of the lookup table and if it was a sas dataset or an external dbms table, a hash lookup might be faster but comes with more complexity. proc sql; create table want as select b.id_1, t1.lookup as id_1_lookup, b.id_2, t2.lookup as id_2_lookup, b.id_3, t3.lookup as id_3_lookup b.id_4, t4.lookup as id_4_lookup, b.id_5, t5.lookup as id_5_lookup from base b left outer join lookup_table t1 on b.id_1=t1.id left outer join lookup_table t2 on b.id_2=t2.id left outer join lookup_table t3 on b.id_3=t3.id left outer join lookup_table t4 on b.id_4=t4.id left outer join lookup_table t5 on b.id_5=t5.id ; quit;
... View more