由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
相关主题
[合集] 问excel牛人一个问题老帖修改再发,骗包子
[合集] 我想贷款去读个统计ms,不知道风险大不大[通知] Statistics 举办投票: 统计行业工作市场行情调查
[合集] 求助: credit risk analyst 的面试会有什么样的问题?统计版分享经验强帖必读以及奖励办法
[合集] 回复,RogerEric。 about risk analysis如何准备银行Credit risk analyst面试?
[合集] What is new in Applied Linear Regression Models 5th ediStatistics版 - 水枪排名
问一个SAS ROLLING AVERAGE CALCULATION 的问题help with SAS code
请教问题:提供有用信息我会发包子统计版水枪统计
Entry-level statistician 面试 都问什么 technical question ?SAS call symput question
相关话题的讨论汇总
话题: neil话题: names话题: nadine话题: select话题: wilder
进入Statistics版参与讨论
1 (共1页)
z*********o
发帖数: 541
1
given a few names. which codes should I use to select persons that the
person's first name begins with an N? thank you.

the output such as ,
names
CARAWAY, NEIL
CHAPMAN, NEIL
OVERBY, NADINE
WILDER, NEIL
JONES, NATHAN
TUCKER, NEIL
WELLS, NADINE
SAND
w***z
发帖数: 28
2
proc sql;
create table new as
select lastname, firstname
from test
where upcase(firstname) like 'N%';
quit;
z*********o
发帖数: 541
3
column的name 是 names,不是last name,first name, run了一下没有output?

【在 w***z 的大作中提到】
: proc sql;
: create table new as
: select lastname, firstname
: from test
: where upcase(firstname) like 'N%';
: quit;

s******r
发帖数: 1524
4
proc sql;create table test2 as
select * from test
where index(names,", N")>1 or index(names,",N")>1;run;quit;

【在 z*********o 的大作中提到】
: given a few names. which codes should I use to select persons that the
: person's first name begins with an N? thank you.
:
: the output such as ,
: names
: CARAWAY, NEIL
: CHAPMAN, NEIL
: OVERBY, NADINE
: WILDER, NEIL
: JONES, NATHAN

z*********o
发帖数: 541
5
出不来结果 :(

【在 s******r 的大作中提到】
: proc sql;create table test2 as
: select * from test
: where index(names,", N")>1 or index(names,",N")>1;run;quit;

p*****s
发帖数: 7
6
scimitar 的方法work得很好啊。
z*********o
发帖数: 541
7
是的,it works. 刚自己有个地方搞错了,

【在 p*****s 的大作中提到】
: scimitar 的方法work得很好啊。
w***z
发帖数: 28
8
sorry.
using index is a good idea, Scimitar's code should work.
proc sql;
select names
from test1
where scan(upcase(names),2,',') like 'N%';
quit;
z*********o
发帖数: 541
9
thank you so much

【在 w***z 的大作中提到】
: sorry.
: using index is a good idea, Scimitar's code should work.
: proc sql;
: select names
: from test1
: where scan(upcase(names),2,',') like 'N%';
: quit;

s******r
发帖数: 1524
10
In this case, compress would be necessary to handle space.
proc sql;
select names
from test1
where compress(scan(upcase(names),2,',')) like 'N%';
quit;

【在 w***z 的大作中提到】
: sorry.
: using index is a good idea, Scimitar's code should work.
: proc sql;
: select names
: from test1
: where scan(upcase(names),2,',') like 'N%';
: quit;

1 (共1页)
进入Statistics版参与讨论
相关主题
SAS call symput question[合集] What is new in Applied Linear Regression Models 5th edi
现代统计学大家: John Tukey 【ZZ】问一个SAS ROLLING AVERAGE CALCULATION 的问题
求购两本统计教材请教问题:提供有用信息我会发包子
在 R 里面如何循环调用变量名Entry-level statistician 面试 都问什么 technical question ?
[合集] 问excel牛人一个问题老帖修改再发,骗包子
[合集] 我想贷款去读个统计ms,不知道风险大不大[通知] Statistics 举办投票: 统计行业工作市场行情调查
[合集] 求助: credit risk analyst 的面试会有什么样的问题?统计版分享经验强帖必读以及奖励办法
[合集] 回复,RogerEric。 about risk analysis如何准备银行Credit risk analyst面试?
相关话题的讨论汇总
话题: neil话题: names话题: nadine话题: select话题: wilder