Hello, I'm trying to update admin contact name & email information from the 'PrivAdmins' table into the 'Facilities' table.
the 'PrivAdmins' table has more facility codes than the 'Facilities' table.
But I only want the contact info for those facility codes that are in Table A updated (I don't want to add the facility codes listed in only listed in Table B but not Table A).
PrivAdmins Table
FacilityCode AdminName AdminEmail
AdminAdmin [email protected] /*this table has facility codes with missing values too*/
12345 Carla Lan [email protected]
12346 Patrick Miles [email protected]
Facilities Table
FacilityCode AdminName AdminEmail. FacilityName (more variables)...
12345 FacilityA
12349 Niger Kopak [email protected] FacilityB
Desired Result (Adminsp table)
FacilityCode AdminName AdminEmail Facility Name (more variables)...
12345 Carla Lan [email protected] FacilityA
12349 Niger Kopak [email protected] FacilityB
I used this code but it doesn't work.
data adminsp;
update facilities privadmins;
by facilitycode;
run;