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

lrackley_0-1614804070137.png

lrackley_1-1614804091464.png

Hi, I want to combine these datasets but if I join on SOC and PT, I only get respiratory disorders and I need infections and infestations and general disorders as well. Can anyone help? I tried Cartesian join but that didn't produce what I wanted either.

1 ACCEPTED SOLUTION

Accepted Solutions
tarheel13
Rhodochrosite | Level 12

Yeah, well I actually ended up doing something in SQL. I'm sorry that you have such a problem with my post but my organization uses Citrix and it is much faster to upload pictures. Also, you can click on pictures to enlarge them. Getting my code out of SAS requires using an SFTP twice. Anyway, I found a solution on my own.

View solution in original post

4 REPLIES 4
ballardw
Super User

@tarheel13 wrote:

lrackley_0-1614804070137.png

lrackley_1-1614804091464.png

Hi, I want to combine these datasets but if I join on SOC and PT, I only get respiratory disorders and I need infections and infestations and general disorders as well. Can anyone help? I tried Cartesian join but that didn't produce what I wanted either.


Since you do not show anything labeled SOC or PT then I don't see how you combine them on those. I also don't see any "infections" or "infestations" so that is bit problematic as well.

 

So perhaps show the code you used to attempt this "combine". And the contents of both of those examples look to be the same, so wondering what any combining is supposed to yield.

Can you show what you expect the result to look like?

tarheel13
Rhodochrosite | Level 12

There is a label on the SOC variable but is the one that says System Organ Class. I think I found a solution for now. But if someone has something more elegant, I would love to know. This is my ugly solution. I don't like it because I have to output 3 datasets and stack them in another dataset. However, I need to make this pretty quickly so going to continue with it for now I guess.

lrackley_0-1614805860841.png

lrackley_1-1614805893339.png

 

 

ballardw
Super User

@tarheel13 wrote:

There is a label on the SOC variable but is the one that says System Organ Class. I think I found a solution for now. But if someone has something more elegant, I would love to know. This is my ugly solution. I don't like it because I have to output 3 datasets and stack them in another dataset. However, I need to make this pretty quickly so going to continue with it for now I guess.

lrackley_0-1614805860841.png

lrackley_1-1614805893339.png

 

 


Since you do not show any labels for any variable it is hardly to be expected for anyone to know where to find SOC or a possibly mythical System Organ Class.

We can only use the information you show us.

 

And if you look closely at your original post there is no variable AETERM_SOC that you are using in that code. Or the Label. Or the "System Organ Class".

 

PLEASE post code as text in a code or text box opened on the forum with the </> or "running man" icons. Pictures are hard to read, cannot be copied and pasted into an editor to run code or edit to show suggested changes.

 

tarheel13
Rhodochrosite | Level 12

Yeah, well I actually ended up doing something in SQL. I'm sorry that you have such a problem with my post but my organization uses Citrix and it is much faster to upload pictures. Also, you can click on pictures to enlarge them. Getting my code out of SAS requires using an SFTP twice. Anyway, I found a solution on my own.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 556 views
  • 0 likes
  • 2 in conversation