Zack
asked on
SQL Rewrite without the NULLIF
Hi EE,
The 3rd party SQL interpreter I am running this script via doesn't like the NULLIF the script works fine when ran within SQL Server directly.
Is there a way to rewrite this SQL script without the NULLIF?
Any assistance is welcome.
Thank you.
The 3rd party SQL interpreter I am running this script via doesn't like the NULLIF the script works fine when ran within SQL Server directly.
select NULLIF(count(*)*100, 0) as Number from vwReg_RMFeedback_Posted where IncidentInvolved = 'Complaint'
and (select count(*) from tblDayDates where DayDate between IncidentDate and FBAckDate and DateName(WeekDay,DayDate) not in ('Saturday', 'Sunday')) <= 3
and FBAckDate is not null and Site Like '%Bay%'
Is there a way to rewrite this SQL script without the NULLIF?
Any assistance is welcome.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you that work my apologies for the delayed response.
technically that won't return a null for count(*) if there's record(s) returned, so you no need to compare it with case when if it met that condition.
Open in new window