@CCMTH is the current month @CCYR is the current year all in an incremental loop IF @CCMTH = 12 BEGIN SET @CCMTH = 1 SET @CCYR = @CCYR+1 END ELSE IF @CCMTH <> 12 BEGIN SET @CCMTH =@CCMTH+1 SET @CCYR =@CCYR END
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)