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.

Demo: Merging tables with nonmatching rows

Demo: Merging tables with nonmatching rows - SAS Tutorial

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

Demo: Merging tables with nonmatching rows

- [Instructor] Now we'll use the data stat merge in order to combine two tables and identify non-matching rows. We'll start by looking at the storm damage table. So remember this table includes 38 rows, or all storms with cost exceeding $1 billion. In this table we have information about the event, the date, the summary, as well as cost and deaths. But what we don't have is the BasinName, the max wind speed, or the minimum pressure. However that information is contained in the storm final table. So we would like to merge these two tables together to include those two additional columns with the storm damage table. But remember, storm final includes many more rows than just the 38 in storm damage. We have a total of over 3,000 rows. So we will need to limit the rows in our output table to only those rows that match. In other words we want to eliminate the non-matches. Now before we get into the code, let's look a little…

Contents