I\'m trying to write a SQL SELECT query that has a batch number column that increments every 5 rows, I\'ve tried using a hacky integer division on a dynamic row number, but can\
SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS RowNumber,
CEILING(CAST(ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS DECIMAL(10,2))/5) AS BatchNo, *
FROM WorkQueue