MS SQL Server fix for older versions than 2012 (alternative solution)

This alternative solution LIMIT, OFFSET problem SQL Server version older than 2012.