I have a table (email_list) with two values: ORG_ID email_address This tables has multiple records with the same ORG_ID and unique email addresses. I want to build a table so that I have a single row for each ORG_ID with all of the individual emails concatenated into a single value with the emails separated by a comma so that I can use that field to email the users. I have the count of the records: proc sql; select count(*) into :rec_count from work.email_list; quit; Then I want to build the list: %do j=1 to &rec_count; if first record: org = org_id; email = email_address else if org = org_id then email = email || "', '" || email_address else org = org_id, email = email_address;
... View more