全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2593 1
2011-10-03

70.After a SAS program is submitted, the following is written to the SAS log:

  105    data WORK.JANUARY;
  106    set WORK.ALLYEAR(keep=Product Month Quantity Cost);
  107    if Month=’JAN’ then output WORK.JANUARY;
  108    Sales=Cost * Quantity;
  109    drop=Month Quantity Cost;
                      —–
                      22
  ERROR 22-322: Syntax error, expecting one of the following: !,
                !!, &, *, **, +, -,
  , <=, <>, =, >, >=,
                AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
                NOTIN, OR, ^=, |, ||, ~=.
  110  run;

What data set option could be attached to WORK.JANUARY to replace the DROP statement that generated the error in the log?

     A. (drop Month  Quantity  Cost)
     B. (drop Month, Quantity, Cost)
     C. (drop=Month, Quantity, Cost)
     D. (drop=Month  Quantity  Cost)

Answer: D

DROP语句,在DATA STATEMENT中,不需要等号
在SET 语句中,需要括号以及等号。

http://crackman.net/?p=401

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-10-4 14:27:06
很好的解释。
我今天顶了4个帖子了,不会把我当成恶意灌水吧。
我就是想让大家都看看这些基础的解释。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群