Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

Using the EXCEPT Set Operator

A Brief Overview

The set operator EXCEPT does both of the following:
  • selects unique rows from the first table (the table specified in the first query) that are not found in the second table
  • overlays columns
Figure 4.1 EXCEPT Set Operator Relationship
EXCEPT Set Operator Relationship

Example: Using the EXCEPT Operator Alone

Suppose you want to display the unique rows in table Col1 that are not found in table Col2. The PROC SQL set operation that includes the EXCEPT operator, the tables Col1 and Col2, and the output of the set operation are shown below.
proc sql;
   select *
      from certadv.col1 except select * from certadv.col2; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692