Hi there,
I am a 110% novice in SAS and need to merge two big datasets. My problem is that I have multiple observations in multiple tables that use the same variable. It is unfortunately the only variable that all the tables share. When I merge them initially I get of course, duplicate observations, many with much of the same information but 1 or 2 variables have different information.
Would I create a dataset using a new variable to deal with this? In the end, I'd like to just have 1 'ID' per person, not multiple records per person.
To be more precise, going off of another's post, my data looks somewhat like this:
StudyID
1356 Comment1
1356 Comment2
1356 Comment3
1444 Comment1
1444 Comment2
1667 Comment1
1551 Comment1
1551 Comment2
1551 Comment3
1551 Comment4
There can be an infinite number of comments per ID (however, there usually aren't more than 3 or 4) I want to get all 3 comments for ID 1356 (for example) into multiple variables like this:
ID COMM_Multiple Comm_Count Comm1 Comm 2
1356 Y 3 " " " "
I can't get it to even look right on here. But I want the Y to match with Comm_multiple and the 3 to be under Comm_count
Etc etc.... does this make any sense? I don't want them concatenated into one variable, but I want each comment to
remain its own variable. I just want ID to be a single, unique identifier so that there is only 1 per person.
I don't know what to do!
Help 😞
Thanks :)
Message was edited by: Nov_girl