I have a variable that stores the number of times a query runs, but it has a length limitation of 3 characters, which I can't modify. As such, once the Count reaches 999, I assume the logic will fail.
SET @QueryCount = (
SELECT COUNT(1) FROM dbo.Records WHERE QueryName = @QueryName
);
Currently I have no logic to account for a Count that is over 3 characters, and the expectation is that the Variable will be reset to a Count of 1 once it reaches 999.