04-07-2017 01:33 PM
Do you have any code that you're currently trying? It's not clear to me if you want to merge on all three variables or just the first two and you want to figure out how to deal with third.
04-07-2017 01:48 PM
Or if you mean that you want to populate 'number' with 'work,' you could do:
number = coalescec(number, work);
I'm not sure about what the variable types are, though.
04-07-2017 01:55 PM
I have chracter variable. Also you can think like its left join . i only want to take if the work has variable and number doesn;t have variable.
id work number
11 2 2
13 3 3
15 1 1-2
16 2 2-3
So i have the table without red variables. I want the table with red variables
04-07-2017 02:00 PM
data have; infile datalines dsd; input id work $ number $; datalines; 11, 2, 12, , 13, 3, 15, 1, 1-2 16, 2, 2-3 ; data want; set have; number = coalescec(number, work); run;