Hi all! Is there a more efficient way to write this sql join? The tables I am querrying are not that large, but the processing time is taking forever. Basically, I have unique ids in table A (patid_copy). I want to pull all records from b,c,d,e,f - that have matching id (patid_copy=patuniq). Thanks!
proc sql; create table asthma.missing_sidr as select a.*,b.*, c.*, d.*,e.*,f.* from patid as a ,sidr.mdrsidrfy10 as b ,sidr.mdrsidrfy11 as c ,sidr.mdrsidrfy12 as d ,sidr.mdrsidrfy13 as e ,sidr.mdrsidrfy14 as f where a.patid_copy= b.patuniq or a.patid_copy= c.patuniq or a.patid_copy= d.patuniq or a.patid_copy= e.patuniq or a.patid_copy= f.patuniq; quit;
... View more