由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 怎么解决这个sas macro的问题?
相关主题
sas question - quotation marks%quote and %bquote
[合集] 问个SAS的问题问一个sas问题
还是那个MACRO的问题Help: an I/O ERROR occured
Question about SAS like %【大包子】问个macro的问题
请教一个 SAS macro[合集] 说一个proc sort的很简单却总有人错的问题
title statement请教:三道SAS BASE题
请问如何把一个数据里所有的变量名后面都加个v?thanks.选导师求助--非常感谢!
请教call executeupdate (some interview experiences)--急,面试求助:用ACCESS
相关话题的讨论汇总
话题: mentor话题: name话题: 2nd话题: sas话题: unbalanced
进入Statistics版参与讨论
1 (共1页)
x******6
发帖数: 160
1
mentor_2_nodup_active 数据库里面有一些mentor的名字 (mentor_name_2),
mentor_one_mentee_active 数据库里面有另外一些mentor的名字 (mentor_name_1),
mentor_name_2里面的一些名字和mentor_name_1里面的名字是一样的,
我想看看哪些mentor的名字两个数据库里面都有,
我用sql create 一个 macro variable,
然后查找,可是最后给我的结果是0,原因是: The quoted string currently being
processed has become more than 262 characters long. You may have unbalanced
quotation marks.
不知道哪位sas高人能给指点一下,怎样解决这个sas macro的问题。
BTW: 我知道可以用 sas data step来merge两个 databases。可是,我不想这样做,
因为还要sort数据,rename variable。
proc sql;
select distinct mentor_name_2
into :mentor_2nd separated by ', '
from mentor_2_nodup_active;
quit;
%let mentor_2nd = &mentor_2nd;
data test;
set mentor_one_mentee_active;
if mentor_name_1 in ("&mentor_2nd") then mentor_1st_2nd = 1;
run;
Warning: The quoted string currently being processed has become more
than 262 characters long. You may have unbalanced quotation marks.
A****1
发帖数: 33
2
change the into operator to:
into :mentor_2 separated by '", "'
Be careful with IN operator: if var1 in ("A","B","C");

),
unbalanced

【在 x******6 的大作中提到】
: mentor_2_nodup_active 数据库里面有一些mentor的名字 (mentor_name_2),
: mentor_one_mentee_active 数据库里面有另外一些mentor的名字 (mentor_name_1),
: mentor_name_2里面的一些名字和mentor_name_1里面的名字是一样的,
: 我想看看哪些mentor的名字两个数据库里面都有,
: 我用sql create 一个 macro variable,
: 然后查找,可是最后给我的结果是0,原因是: The quoted string currently being
: processed has become more than 262 characters long. You may have unbalanced
: quotation marks.
: 不知道哪位sas高人能给指点一下,怎样解决这个sas macro的问题。
: BTW: 我知道可以用 sas data step来merge两个 databases。可是,我不想这样做,

c******n
发帖数: 380
3
you can try this:
proc sql;
create table abc as select name from a where name in (select unique name
from b);
quit;
If you just want to eliminate the warning message, try 'option noquotelenmax
;' before proc sql;
1 (共1页)
进入Statistics版参与讨论
相关主题
update (some interview experiences)--急,面试求助:用ACCESS请教一个 SAS macro
Do you share your sas Macros or R code with co-workers?title statement
没完没了的LAYOFF!请问如何把一个数据里所有的变量名后面都加个v?thanks.
Stupid SAS programming style is driving me crazy....请教call execute
sas question - quotation marks%quote and %bquote
[合集] 问个SAS的问题问一个sas问题
还是那个MACRO的问题Help: an I/O ERROR occured
Question about SAS like %【大包子】问个macro的问题
相关话题的讨论汇总
话题: mentor话题: name话题: 2nd话题: sas话题: unbalanced