Declare @Date char(8), @CurrentMonth int, @LengthFutureMonth int, @FutureMonth char(2), @Year char(4), @FinalDate1 char(8), @FinalDate2 char(8)
Set @Date = (select dateidentifier from tbldonoterase)
Set @Year = Left(@Date, 4)
Set @CurrentMonth = right(Left(@Date,6), 2)
Set...