'proc Sql Case Statement returning Null values
Can someone look at my Proc Sql and tell me why the below case staement is returing Null values in the data? I have never seen this, there are no errors, the code runs and the case statement value (Enrollment_Period) in the data is Null. Any ideas or solutions ?
proc sql;
create table Data_Active as
select distinct
e.cova_evnt_efcv_dt as cova_evnt_efcv_dt Format=MMDDYYS10.,
e.cova_evnt_eprn_dt as cova_evnt_eprn_dt Format=MMDDYYS10.,
year(cova_evnt_efcv_dt) as Year,
month(cova_evnt_efcv_dt) as Month,
Case
when 'Month' = "1" then "AEP"
when 'Month' = "2" then "OEP"
when 'Month' = "3" then "OEP"
when 'Month' = "4" then "LockIn"
when 'Month' = "5" then "LockIn"
when 'Month' = "6" then "LockIn"
when 'Month' = "7" then "LockIn"
when 'Month' = "8" then "LockIn"
when 'Month' = "9" then "LockIn"
when 'Month' = "10" then "LockIn"
when 'Month' = "11" then "LockIn"
when 'Month' = "12" then "LockIn"
end as Enrollment_Period,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|