见下面的代码。对于特定行业,例如“Fss”有一个标题列表,变量作业标题必须与标题创建匹配。
proc sql;
create table ildp.ildp_1h_v5 as
select industry,jobtitle,webpagesource,assetname,qtr,companyname,
case
when industry = "FSS" and (jobtitle like 'CMO%' OR jobtitle like 'Chief Innovation)
then 1
else case when ..#continued.#
答案 0 :(得分:2)
or like
无效的SQL。试试这个:
proc sql;
create table ildp.ildp_1h_v3 as
select *,
(case when industry = "FSS" and
(jobtitle like 'CIO%'
OR jobtitle like 'ChiefInnovation%'
OR jobtitle like 'director%'
OR jobtitle like 'head%'
OR jobtitle like 'distribution%'
OR jobtitle like 'claims%'
OR jobtitle like 'VP%'
OR jobtitle like 'President%')
then 1 else 0
end) as title_flag
from ildp.ildp_1h_v2;
quit;