楼主: yuyuelife
3397 9

sas base 123 两个字符串长度问题疑惑求解答! [推广有奖]

  • 0关注
  • 0粉丝

高中生

20%

还不是VIP/贵宾

-

威望
0
论坛币
797 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
296 点
帖子
17
精华
0
在线时间
22 小时
注册时间
2013-7-26
最后登录
2024-2-16

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
question 72
The following SAS program is submitted:
data work.test;
First = 'Ipswich, England';
City = substr(First,1,7);
City_Country = City!!', '!!'England';
run;
Which one of the following is the value of the variable CITY_COUNTRY in the output data set?
A. Ipswich!!
B. Ipswich, England
C. Ipswich, 'England'
D. Ipswich , England


为什么答案是D????  ,前面那个空格是从哪里来的?

question 79
the following SAS program is submitted:
data work.products;
Product_Number = 5461;
Item = '1001';
Item_Reference = Item||'/'||Product_Number;
run;
Which one of the following is the value of the variable ITEM_REFERENCE in the output data set?
A. 1001/5461
B. 1001/ 5461
C. . (missing numeric value)
D. The value can not be determined as the program fails to execute due to errors.


为什么答案是B????  /后面那个空格是从哪里来的?


完全晕了,求解答!!多谢!!





二维码

扫码加我 拉你入群

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

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

关键词:SAS base Base 求解答 字符串 Determined following question 字符串

沙发
zhengbo8 发表于 2014-9-14 22:30:34 |只看作者 |坛友微信交流群

使用道具

藤椅
yuyuelife 发表于 2014-9-19 22:52:33 |只看作者 |坛友微信交流群
zhengbo8 发表于 2014-9-14 22:30
http://www.cnblogs.com/zhengbo8/archive/2013/05/18/3085850.html
多谢多谢!!!

使用道具

板凳
lqyrendajinji 发表于 2014-9-21 09:33:24 |只看作者 |坛友微信交流群
xuexile xuexile

使用道具

报纸
moraine123 发表于 2014-11-19 19:39:41 |只看作者 |坛友微信交流群
学习了,谢谢!

使用道具

地板
eileenhu1990 发表于 2014-11-20 02:23:44 |只看作者 |坛友微信交流群
受益匪浅!!感谢2L提供的链接

使用道具

7
bianyue 发表于 2015-11-21 16:34:42 |只看作者 |坛友微信交流群
79题还是不明白啊,为什么B. 1001/     5461,前面的空格是数值转字符产生的吗

使用道具

8
teqel 发表于 2015-11-21 22:25:15 |只看作者 |坛友微信交流群
bianyue 发表于 2015-11-21 16:34
79题还是不明白啊,为什么B. 1001/     5461,前面的空格是数值转字符产生的吗
是8个空格,自己可以试一下

使用道具

9
bianyue 发表于 2015-11-22 13:23:39 |只看作者 |坛友微信交流群
teqel 发表于 2015-11-21 22:25
是8个空格,自己可以试一下
我运行了,就是不知道为什么

使用道具

10
bianyue 发表于 2015-11-22 22:56:00 |只看作者 |坛友微信交流群
MARK,数字转为字符格式,字符长度变为12,长度不够的话前面补0,此题同base50题的第21题
data work.AreaCodes;
Phonenumber=3125551212;
Code='('!!substr(Phonenumber,1,3)!!')';
run;
Which one of the following is the value of the variable Code in the output data set?
a. ( 3)
b. (312)
c. 3
d. 312
Correct answer: a

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-24 10:56