-- Collection of code snippets by Arne Vajhøj 
-- posted to eksperten.dk, usenet and other places (2002-now) 
SELECT * FROM t1 ORDER BY f1
GO
SELECT f1,f2,ROW_NUMBER() OVER (ORDER BY f1) n FROM t1 ORDER BY f1
GO
SELECT * FROM (SELECT f1,f2,ROW_NUMBER() OVER (ORDER BY f1) n FROM t1) x WHERE n % 4 = 1 OR n % 4 = 0  ORDER BY f1
GO
