Hello I am stuck with a problem where i have to merge together two datasets. Both datasets contains a year variable and a ID variable. Furthermre Dataset A contains a Start and a End variable and Dataset B contains also a Start and End variable. Dataset A: Dataset B ID Year Start End Type ID Year Start END Type 1 2000 5000 5055 A 1 2000 5025 5100 B 1 2000 5125 5365 A 1 2000 5200 5300 B 1 2001 5366 5600 A 1 2001 5500 5800 B Okay, so B is more "powerfull" than A, and this one takes over for A if there are some overlaps, and i should therefor end out with something like: ID Year Start End Type 1 2000 5000 5024 A 1 2000 5025 5100 B 1 2000 5125 5199 A 1 2000 5200 5300 B 1 2000 5301 5365 A 1 2001 5366 5599 A 1 2001 5600 5800 B I was thinking about doing a PROC SQL join, and then find some patterns, but i can't really do that (or i am not smart enough) Hope there is someone who can help.
... View more