Countdown of the Top 10 Ways to Merge Data

Joining or merging data is one of the fundamental actions carried out when manipulating data to bring it into a form for either storage or analysis. The use of the MERGE statement inside a datastep is the most common way data is merged within the SAS® language but there are others. Based on an unscientific poll of SAS programmers and others who use SAS, this paper gives a countdown of the top 10 ways to merge two datasets, introducing the SAS code needed to join the datasets into one. Although discussion is focused on a one-to-one or one-to-many merge, some of these methods can be, and will be indicated as such, adapted to a many-to-many merge.