@GN0001 wrote:
Hello,
Basically, for each KEY, all the right-side observations are read first and loaded into a hash object in memory. Then for each subsequent left observation, the program iterates through the hash object, retrieving values from the right-side and outputting for each iteration.
Does this
set right (in=inR) left (in=inL);
by key;
determine which table should be read first?
If we had:
set Left (in=inL) right(in=inR)
Is the top reads the right table first even if it is the second table in a row?
Respectfully,
blueblue
This is one of those questions that can well be answered by
Examining the Documentation on the SET statement Take notice of examples 1: concatenating data sets, and 2: interleaving data sets. and/or
Running some tests - one of the great features of learning any programming language or programming tool like SAS.
More generally, since you want to do a left join, you first want to load the RIGHT data into memory, so that it can be repeatedly and inexpensively looped over for each su7bsequent matching LEFT observation. This in turn means you have to read the RIGHT prior to the LEFT, in order to put it in memory. Thus "set right left". The opposite ("set left right") would yield NO data from RIGHT, since it isn't in memory when processing the LEFT dataset.
... View more