Hi all,
I have a question about a statement in the SAS Certified Professional Prep Guide - Advanced Programming Using SAS 9.4.
I thought that WHERE statements were evaluated after tables are joined in a PROC SQL query. On page 68: "In all types of joins, PROC SQL generates a Cartesian product first, and then eliminates rows that do not meet any subsetting criteria that you have specified."
However, when discussing outer joins on page 79, the text reads, "Note: To further subset the rows in the query output, you can follow the ON clause with a WHERE clause. The WHERE clause subsets the individual detail rows before the outer join is performed. The ON clause then specifies how the remaining rows are to be selected for output."
I might be missing something, but these statements seem contradictory. Are there situations where a WHERE clause (not dataset option) applies before the join is performed?