结果:找到“case when”相关内容10个,排序为按回复时间降序,搜索更多相关帖子请点击“高级”
sql语句,case when 搭配max()该如何理解
3 个回复 - 11151 次查看
表信息为:create table SC(SID tinyint,CID tinyint,score tinyint)charset utf8;set names gbk;
insert into SC
values(01,01,80),(01,02,90),(01,03,99),(02,01,70),(02,02,60),(02,03,80),(03,03,80),(04,01,5 ...
2018-5-30 11:25 - 安安、静静 - SQL及关系型数据库数据分析
请问如何在case when中添加两个条件?
5 个回复 - 16735 次查看
/*计算各公司高管任现职务的平均年龄,存放于dup_mean*/
/*方法一*/
proc sql;create table dup_mean as
select *,
mean(
case substr(id_zhiwu,3,2)
when'30' and index(zhiwu,"副")
when 0 then age else . end ...
2014-11-30 09:57 - lizhewenbei - SAS专版
关于 SQL 中用 case when in (a list)
6 个回复 - 15438 次查看
要转换这段data step 为sql。
if substr(postal_code,1,1) in ('K','L','M','N','P') THEN PROVINCE='ON' ;
ELSE PROVINCE='XX';
想用下面
when in (list of value)的方式但是报错:ERROR: Operand of WHEN cl ...
2013-10-1 23:21 - 9days - SAS专版
请教case when的用法
3 个回复 - 15393 次查看
proc sql;
create table cust_card_stat as
select
UM_JG as area_name
,
case when flag1 in ('有工具') then 1 else 0 end as web
from
where
;
run;
不知道
case when那句什么意思,请高 ...
2010-9-18 16:50 - reolin - SAS专版