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.4 Selecting Unique Rows When Concatenating Tables

Goal

Select the unique rows among two or more tables based on the value of a specific column.

Example Features

Featured StepPROC SQL
Featured Step Options and StatementsUNION set operator
Related TechniqueDATA step PROC SORT, NODUPKEY option

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 ...

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