I am using TSQL. I have a set of data in a table. I have a stored procedure that runs every day that populates this table. The thing is I need the order of the data to change each day of the month. This data needs to dynamically split up into 7 groups.
I have 300 pieces of data, I run the query on the first day and I have items 1-300. The second day I would run it and I would have at the top of my list 43-300 and at the bottom 1-42 (in that order). The third day I would have 86-300 on top and then 1-85 on the bottom (in that order). The fourth day and so on throughout the month would be continuing this.
I already have the initial sort, which has to remain in tack. I need a secondary sort (grouping) that would allow this movement.
I am not sure how to do this. Could anyone give me any ideas on how to do such a thing. I know how to do this if it was based on the week, but month is a bit more confusing.