I have a result dataset,
Dataset dsResult = new Dataset();
dsResult.Tables[0].Rows.Count = 17
Now i want to loop through data table for first 5 rows and create a dsResult.Tables[1]
and then next 5 more rows to dsResult.Tables[2]
and next 5 more to dsResult.Tables[3]
then last two rows to dsResult.Tables[4]
from below code i am getting number of tables required
decimal remainder = Decimal.Divide(dsResult.Tables[0].Rows.Count, 5); var numberOfRequests = Math.Ceiling((decimal)remainder);
Or can we do it in SQL
How to genaralize this logic.
Please guide me here.