Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
(AVG_Excess*1.0) / CASE Bound WHEN 0 THEN 1 ELSE Bound END AS Avg_SIR_Excess
I want to add null as a when statement with 0 is this correct syntax to use:
(AVG_Excess*1.0) / CASE Bound WHEN 0 or NULL THEN 1 ELSE Bound END AS Avg_SIR_Excess
Thanks!
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts
Posted - 2007-05-09 : 11:26:48
[code](AVG_Excess*1.0) / CASE WHEN Bound = 0 or Bound IS NULL THEN 1 ELSE Bound END AS Avg_SIR_Excess[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED"