So I if Place =Hosp1 delete not only the single record but instead the entire Id. Basically I would like to remove Ids containing Hosp1. Can anyone help me please? Thank you very much
From now on, please provide data as WORKING data step code, as shown below.
data have;
input Id $ Place $;
cards;
A Hosp1
A Hosp2
B Hosp1
B Hosp1
C Hosp3
C Hosp4
;
proc sql;
create table want as select *
from have
group by id having max(place='Hosp1')=0;
quit;
From now on, please provide data as WORKING data step code, as shown below.
data have;
input Id $ Place $;
cards;
A Hosp1
A Hosp2
B Hosp1
B Hosp1
C Hosp3
C Hosp4
;
proc sql;
create table want as select *
from have
group by id having max(place='Hosp1')=0;
quit;
-- Paige Miller
The 2025 SAS Hackathon has begun!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.