Hi All,
I'm looking to create a number of different tables which are broadly similar but have a different number of additional variable which are calculated. So standard_vars will always be standard but the count of other variables I'd like determined on the select (*) from the first statement. I.e. if count(*) is 2 then I'd only have 2 additional variables in the create table statement. Would anybody be able to help me limit the variables in the second statement? Any help would be greatly appreciated.
proc sql; select count(*) into :var_count from edd_derivations where event_type=&num.; quit;
proc sql; create table _&num. as select &standard_vars., &derivation_1. as &name_1., &derivation_2. as &name_2., &derivation_3. as &name_3., &derivation_4. as &name_4. from _events_ and event_type="&num." ;quit;
... View more