When executing the steps in this query. I am running into an issue with the
DECLARE @CutoffDate DATE = DATEADD(YEAR, @NumberOfYears, @StartDate);
I get a message of Msg 137, Level 15, State 2, Line 2
Must declare the scalar variable “”CutOffDate”.
Should I be adding something in this syntax? Meaning “year” should be defined? or something along those lines?