Attempting to determine what the actual cost of a salary step increase will be during the current fiscal year. The approach used is to determine the current salary, then the new salary. Their difference would be the annualized increase. However, the increase will not be in effect for the complete fiscal year. To determine the percentage of the year that it will be in force I use DateDiff using the salary increase date (Sal Con Date) and subtract it from the fiscal year end date which is expressed as 41455 (06/30/2013). The query run ok, but I get that nasty inbox asking for a parameter. How do I overcome this issue? Or better how do I write good code to meet my objective?
Code:
SELECT tblCS3Compilation.Name, tblCS3Compilation.[Sal Con Date], DateDiff("d",[Sal Con Date],41455) AS Days, [Days]/365 AS StepIncreasePercent
FROM tblCS3Compilation INNER JOIN tblSalaryTables ON (tblCS3Compilation.Step = tblSalaryTables.Step) AND (tblCS3Compilation.JobClass = tblSalaryTables.JobClass)
GROUP BY tblCS3Compilation.Name, tblCS3Compilation.[Sal Con Date], DateDiff("d",[Sal Con Date],41455), [Days]/365;