Issue with DECLARE @CutOffDate DATE = DATEADD(YEAR), @NumberOfYears, @StartDate); 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?
I notice a case-sensitive difference between your declaration @CutoffDate, and @CutOffDate from the error message.

Check to see if you're not using a case-sensitive collation.