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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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