Skip to Content
Apr 26, 2018 at 01:53 PM

OData Query: How to skip every second entry?

282 Views Last edit Apr 26, 2018 at 01:55 PM 2 rev

I have a small webapp consuming an OData service (in particular the Message Management Service API of SAP Cloud Platform Internet of Things Service). I want to add a query option to my query to skip (e.g.) every second entry. Is that possible with OData options and how? Is there another solution? Filtering the data after downloading would be very unsatisfying. Maybe this may help: The queried data is sort by a timestamp but the duration between to data entries (difference in the timestamp) may vary. So a simple filter by divisibility of the timestamp is not possible.

Thanks in advance!