Created
May 31, 2016 19:18
-
-
Save juan-fdz-hawa/6ad3fb72b3d71f28617ed2f3721790fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ROW_NUMBER() OVER (Order by (select 0)) AS RowNumber, | |
(CASE WHEN CONVERT(INT, (ROW_NUMBER() OVER (ORDER BY (SELECT 0)) % 16)) = 0 THEN 0 ELSE 1 END) + CONVERT(INT, (ROW_NUMBER() OVER (ORDER BY (SELECT 0)) / 16)) as PageGroup, | |
(CASE WHEN CONVERT(INT, (ROW_NUMBER() OVER (ORDER BY (SELECT 0)) % 8)) = 0 THEN 0 ELSE 1 END) + CONVERT(INT, (ROW_NUMBER() OVER (ORDER BY (SELECT 0)) / 8)) as RowGroup, | |
* | |
FROM <<TABLE>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment