hello, new to sas eg. mostly know tsql I need assign the result-set of a proc sql query into a table variable, and then i need to call that variable within a data step. the proc sql query: proc sql;
create table work.finalcode as
select
cats(substr(id,1,7),row_number,substr(id,9,14),row_number,substr(id,24,length(id) ) ) as code
from chhccs_result; the result of the above query are 4 rows: address1= scan(column,1,',') address2= scan(column,2,',') address3= scan(column,3,',') address4= scan(column,4,',') the above 4 rows need to be assigned to a variable if possible, then referenced in a subsequent data step, as part of the data step: data work.test;
set work.test;
VARIABLE THAT LISTS THE 4 ROWS HERE
run; so that when the data step runs, its runs as if its written like this: data work.test;
set work.test;
address1= scan(column,1,',');
address2= scan(column,2,',');
address3= scan(column,3,',');
address4= scan(column,4,',');
run; thanks in advance, spent all day trying to figure this out
... View more