Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

nested case

$
0
0

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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>