Item 42
The NOTSORTED option on the BY statement cannot be used with which other statement or option?
A. SET
B. MERGE
C. IF FIRST.by-variable
D. BY GROUPFORMAT by-variable
这题选B。
是因为merge the transposed dataset不用 merge statement吗?
请大家帮忙解答谢谢!
Merge也可以用,但是只是针对单一的satement. 多个就不行了。
可以看看这个http://www.lexjansen.com/nesug/nesug06/po/po14.pdf
The BY statement applies only to the SET, MERGE, MODIFY, or UPDATE statement that immediately precedes it in the DATA step, and only one BY statement can accompany each of these statements in a data step.
Consequently, NOTSORTED cannot be used with the MERGE statement, UPDATE statement, or when the SET statement lists more than one data set.