From the course: SAS® 9.4 Cert Prep: Part 12 Combining Tables

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

What is a merge?

What is a merge?

- [Instructor] Merging or joining tables is necessary when you want to combine columns from multiple tables into a single table. There are different ways to accomplish this in SAS. One way is to join the tables in PROC SQL. But the data step also enables you to merge tables together in an efficient and logical process. Because the data step and PROC SQL use different methods for combining data behind the scenes each has unique strengths. It's helpful to know both methods so you can take advantage of the most efficient code depending on your situation. Let's learn about how to merge tables in the data step. A merge or join is made by matching values of a common column in the tables. There are several scenarios that could arise. You could have a one-to-one merge where each row in one table matches a single row in the other table. You could have a one-to-many merge where each row from one table matches with one or more rows in…

Contents