From the course: SAS® 9.4 Cert Prep: Part 12 Combining Tables

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Identifying matches and nonmatches

Identifying matches and nonmatches - SAS Tutorial

From the course: SAS® 9.4 Cert Prep: Part 12 Combining Tables

Identifying matches and nonmatches

- [Instructor] The output table you create when you merge tables with non matching rows might not be quite what you want. Suppose you only want to include students that are in both tables. Or suppose you want to identify students that are missing in one of the tables. You can use the IN= dataset option to create temporary variables in the PDV that you can use to flag matching or non matching values. The in= dataset option follows one or more tables on the merge statement, and names a temporary variable that is added to the PDV. The in= variables are included in the PDV during execution, but are not written to the output table. Each in= variable is associated with a particular table that the option follows. During execution, the in= variables are assigned a value or zero or one. Zero means that the table does not include the by column value for that row and one means it does include the by column value. Let's see what…

Contents