%let state_exclude = Michigan Maine Minnesota;
proq sql;
create table States
select state
from geography_dim as geo
where geo.country="US" and geo.state ~= "&state_exclude"
quit;
我不是美国人,是“密歇根州缅因州明尼苏达州”三个独立的地方吗?如果是这样,你应该使用 in 操作员而不是 = . 例如:
%let state_exclude = "Michigan" "Maine" "Minnesota";
proq sql;
create table States as
select state from geography_dim
where country="US" and state not in (&state_exclude);
quit;
1条答案
按热度按时间sr4lhrrt1#
我不是美国人,是“密歇根州缅因州明尼苏达州”三个独立的地方吗?如果是这样,你应该使用
in
操作员而不是=
. 例如: