Can someone please help. need help with translating this IIF's statement to SQL Server CASE Statement . I dont what am meant to do to the minus part of the statement
I understand the part that reads CASE WHEN latestbaselineDate is NULL Then OriginalBaselineDate ELSE LatesbaselineDate
END as
[Milestone - Baseline Date],
Milestone.[Actual-ForecastDate] AS [Milestone - Forecast Date],
this is the IIF Statement .
---------------------------------------------------------------------------------------------------------------------------------------------
IIf([LatestBaselineDate] Is Null,[OriginalBaselineDate],[LatestBaselineDate]) AS [Milestone - Baseline Date],
Milestone.[Actual-ForecastDate] AS [Milestone - Forecast Date], [Actual-ForecastDate]-
(IIf([LatestBaselineDate] Is Null,[OriginalBaselineDate],[LatestBaselineDate])) AS [Milestone - Variance (Days)],
Milestone.Status AS [Milestone - Status], Milestone.MilestoneNotes AS [Milestone - Comments], Milestone.Source AS [Milestone - Category], Milestone.[Critical Path] AS [Delivery Critical Path]
I understand the part that reads CASE WHEN latestbaselineDate is NULL Then OriginalBaselineDate ELSE LatesbaselineDate
END as
[Milestone - Baseline Date],
Milestone.[Actual-ForecastDate] AS [Milestone - Forecast Date],
this is the IIF Statement .
---------------------------------------------------------------------------------------------------------------------------------------------
IIf([LatestBaselineDate] Is Null,[OriginalBaselineDate],[LatestBaselineDate]) AS [Milestone - Baseline Date],
Milestone.[Actual-ForecastDate] AS [Milestone - Forecast Date], [Actual-ForecastDate]-
(IIf([LatestBaselineDate] Is Null,[OriginalBaselineDate],[LatestBaselineDate])) AS [Milestone - Variance (Days)],
Milestone.Status AS [Milestone - Status], Milestone.MilestoneNotes AS [Milestone - Comments], Milestone.Source AS [Milestone - Category], Milestone.[Critical Path] AS [Delivery Critical Path]