Quantcast
Viewing all articles
Browse latest Browse all 8623

Re: "case col1 when null then..." not working

Hi,

 

Try exceuting,

 

select

    col1,

    col2,

   ( (case when col1 IS NULL then 0 else 10  end ) + (case when col2 IS NULL then 0  else 1 end )) as  weight

  from tab1

 

Cheers,

Pp


Viewing all articles
Browse latest Browse all 8623

Trending Articles



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