全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2452 1
2016-10-27
Item 48
Given the following program and data:
data WORK.BDAYINFO;
infile datalines;
input Name $ Birthday : mmddyy10.;
datalines;
Alan 11/15/1950
Barb 08/23/1966
Carl 09/01/1963
;
run;
%let Want=23AUG1966;
proc print data=WORK.BDAYINFO;
[_insert_statement_]
run;
What is the WHERE statement that successfully completes the PROC PRINT and selects the observation for Barb?
A. where Birthday=&Want;
B. where Birthday=“&Want”;
C. where Birthday=“&Want”d;
D. where Birthday=‘&Want’d;
答案是C  ,但是为什么D不行呢?我试过了,where Birthday = ‘23AUG1966’d和where Birthday = “23AUG1966d都可以,为什么换成宏变量就不行了呢?求大神解答
二维码

扫码加我 拉你入群

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

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

全部回复
2016-10-27 20:31:38
如果把宏变量引用放到单引号里,那SAS则不会去解析宏变量的值。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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