Amour22015
asked on
SQL Server 2014 - ISNULL/IS NOT NULL
Hi Experts,
This there a better way to write:
something like:
Is this correct? Seems this would make better performance if several of these Case when statements could be replaced?
Thank You for helping me...
This there a better way to write:
cast(sum (case when (nn1.iplong is null and nn1.plugin is null) and (sa.plugin is not null and sa.iplong is not null) then 1 else 0 end ) as Decimal(18,2)) / cast(count(sa.scandate) as Decimal(18,2))* 100 as [Percent 30],
I have several CASE When statements that are similar. something like:
Cast(Sum(ISNULL(nn1.iplong and nn1.plugin) and IS NOT NULL(sa.plugin and sa.iplong ) then 1 else 0 end ) as Decimal(18,2)) / cast(count(sa.scandate) as Decimal(18,2))* 100 as [Percent 30],
[/code]Is this correct? Seems this would make better performance if several of these Case when statements could be replaced?
Thank You for helping me...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER