Hi, What I need to do is sort a database by record ID so that the most current record is at the top, sum a field in that record and the record beneath it, skip 4 records backwards and start over.
Thank You Much!
Hi, What I need to do is sort a database by record ID so that the most current record is at the top, sum a field in that record and the record beneath it, skip 4 records backwards and start over.
Thank You Much!
provide some example data and the result required from your example data since your description is not making sense. what happens to rows 3 and 4? where do you want the result?
Otherwise best I can suggest is use the TOP 2 predicate in a query ordering by ID desc then sum that