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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!