Quantcast
Viewing all articles
Browse latest Browse all 24688

nested case

I have the logic below 

if year(shipd) <2020 
if otype !='SC10' then set notify =1 else notify=2 end if
else set notify =2

end if

I now want to have this in case statement below, not sure if i have it right?

select case when year(shipd) <2020 
then 
case when otype !='SC1' then 1 else 0 end
else 0 end notify


Viewing all articles
Browse latest Browse all 24688

Trending Articles