BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GreggB
Pyrite | Level 9

Nomatch contains the list of students who have no access_code nor a link. I put in a request for these students and received a file named Extra_codes that has a code and a link for each student. The access_code is unique but the link is unique only to the school. 

 

I want to "transfer" the access_code and link from Extra_codes to Nomatch.    (a copy/paste, if you will).

 

The n count of school in Nomatch is the same as the n count of schoolname in Extra_codes.

 

My 2 data sets:

 

Nomatch

school        last         first        access_code link

east high    able        hotel      

east high    baker      india      

west elem  charlie    juliet       

west elem  delta       kilo        

north mid    echo      lima

north mid    foxtrot    mike

north mid    golf        nove

 

Extra_Codes

schoolname     access_code        link

east high           22                        https://lovesas.com/43

east high           17                        https://lovesas.com/43

west elem          77                        https://lovesas.com/55

west elem          80                        https://lovesas.com/55

north mid           89                        https://lovesas.com/98

north mid           03                        https://lovesas.com/98

north mid            20                       https://lovesas.com/98

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

if the count does match and the order of the data is as you need then this might be as simple as

 

data want;

   merge nomatch extra_codes;

run;

 

Though if the code value of 22 is supposed to go with baker india instead of able hotel then more details needed.

View solution in original post

2 REPLIES 2
ballardw
Super User

if the count does match and the order of the data is as you need then this might be as simple as

 

data want;

   merge nomatch extra_codes;

run;

 

Though if the code value of 22 is supposed to go with baker india instead of able hotel then more details needed.

GreggB
Pyrite | Level 9
thanks. all that matters is that baker and able get codes that belong to east high.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 874 views
  • 0 likes
  • 2 in conversation