SELECT FROM (SELECT * IdNumber from LegacyTable WHERE IdNumber != 0 ORDER BY IdNumber OFFSET 0 ROWS FETCH