Example 3.8 Combining Multiple Data Sets without a Variable Common to All the Data Sets
Goal
Combine three tables that do not all share a common column. Each table has one column in common with a second table, but not with the third. Use this relationship to combine all three tables. Compute a new column by using information from two of the tables.
Example Features
Featured Step | PROC SQL |
Featured Step Options and Statements | Compound WHERE clause |
Related Technique | Hash object in the DATA step |
Input Tables
Table MAINTENANCE contains a list of maintenance tasks performed on four vehicles identified by VEHICLE_ID. Table VEHICLES contains a list of customer vehicles. Table MAINTCHARGES contains a list of tasks identified by TASK_CODE and the charge ...
Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.