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 2.5 Selecting Rows in Common When Concatenating Tables

Goal

Select the rows common to all tables based on the value of a specific column.

Example Features

Featured StepPROC SQL
Featured Step Options and StatementsINTERSECT set operator

Input Tables

Tables MARCHRUNNERS, APRILRUNNERS, and MAYRUNNERS contain the names and running times for the runners in the month that is specified in the table name.

             MARCHRUNNERS

   Obs  runner         racetime
     1  Sanchez, SO    35:49.4
     2  Flores, RX     38:32.8
     3  Martinez, KF   36:12.3
     4  Hayes, MU      35:24.7
     5  Carter, RT     39:38.1
     6  Rogers, LX     40:22.1
     7  Clark, SQ      40:05.8
     8  Taylor, TP     38:30.2
     9  Smith, JD      37:03.5
    10  Green, TF      37:50.0
    11  Brown, GL      35:59.2
    12  Lee, AO        39:36.4
    13  Jones, LW      37:38.3
    14  Smith, KB      38:10.3
 APRILRUNNERS ...

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