in Software Defined Networking by

What is the use of 'BY statement' in Data Step Merge?

1 Answer

0 votes
by
Without 'BY' statement, Data Step Merge performs merging without matching. In other words, the records are combined based on their relative position in the data set. The second data set gets placed to the "right" of the first data set (no matching based on the unique identifier - if data is not sorted based on unique identifier, wrong records can be merged).

When you use 'BY' statement, it matches observations according to the values of the BY variables that you specify.
...