I have the following subquery that calculates the variance in PTO that you have accrued versus the amount that has been approved. Currently if you haven't taken any PTO the varience displays a 0. What I want to display is if the varience = 0 then DATEPART(M, GETDATE( )) * ( PL.Accrual ) = Variance
,ISNULL(( SELECT DATEPART(M, GETDATE( )) * ( PL.Accrual )
FROM PTORequest PR
LEFT OUTER JOIN PTOBeginningBalances PB ON PR.EmployeeUsername = PB.EmployeeUsername
LEFT OUTER JOIN PTOLevelsAccrualHours PL ON PB.Level = PL.Level
WHERE PBAL.EmployeeUsername = PR.EmployeeUsername
AND NOT SUBSTRING(PTOType, 4, LEN(PTOType) - 3) = 'Carryover'
AND ( YEAR(PB.Year) = YEAR(GETDATE()) )
AND SUBSTRING(PR.Status, 4, LEN(PR.Status) - 3) = 'Approved'
AND StartDateAndTime > DATEADD(yy,
AND StartDateAndTime < DATEADD(m,
GROUP BY PL.Accrual
), 0) AS [Variance]