I think you want LEAD - something like: LEAD([Date], 1, '2099-01-01') OVER(PARTITION BY A_ID ORDER BY [Date])
As for the 1 second - a date doesn't have any time associated with it so I am not sure what that would accomplish. If you are trying to define the end date then just use the next start date and make sure you check for less than instead of BETWEEN.