Combining cases

hoyn

New Member
#1
Hello
I'm stuck, and I haven't been able to find any way to solve this problem. I have two databases with different variables them. Cases are sorted by CASE_ID in both.
1. Database1 containing cases (some duplicate)
2. Database2 containing the same CASE_ID but with other variables and no duplicates.

In short, I want to add the variables from Database2 to the matching CASE_ID's in Database1 and keep the duplicates.

Example:
Database1:
CASE_ID=1 DATE=1 TYPE=1
CASE_ID=1 DATE=2 TYPE=1
CASE_ID=2 DATE=2 TYPE=2
CASE_ID=3 DATE=3 TYPE=2
CASE_ID=3 DATE=4 TYPE=2

Database2:
CASE_ID=1 DAYS=123 EQUIPMENT=4
CASE ID=2 DAYS=10 EQUIPMENT=5
CASE ID=3 DAYS=87 EQUIPMENT=6

What I aim for:
CASE_ID=1 DATE=1 TYPE=1 DAYS=123 EQUIPMENT=4
CASE_ID=1 DATE=2 TYPE=1 DAYS=123 EQUIPMENT=4
CASE_ID=2 DATE=2 TYPE=2 DAYS=10 EQUIPMENT=5
CASE_ID=3 DATE=3 TYPE=2 DAYS=87 EQUIPMENT=6
CASE_ID=3 DATE=4 TYPE=2 DAYS=87 EQUIPMENT=6

I haven't found a solution by using add cases or variables (creates new cases). The only solution I've found so far is to just to paste the cases from database 2, sort by CASE_ID and manually copy variables from one CASE_ID row from one to another. I have around 5000 cases with 100+ variables so that would take some time, and I would probably make errors along the way. Is there a way around this?
Any help is appreciated.
 
#2
Not sure if you figured it out, but maybe this video will help:
.
In short you combing variables, select one-to-one merge based on key variables and select case_id as key variable