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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Merging tables with nonmatching rows2m 14s
-
(Locked)
Identifying matches and nonmatches1m 43s
-
(Locked)
Demo: Merging tables with nonmatching rows6m 55s
-
(Locked)
Merging tables with matching column names1m 8s
-
(Locked)
Merging tables without a common column1m 27s
-
(Locked)
DATA step merge and PROC SQL Join38s
-
(Locked)