O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 StepPROC SQL
Featured Step Options and StatementsCompound WHERE clause
Related TechniqueHash 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required