Toby Inkster wrote:
A very simple solution, which would solve the ordering problem (and also greatly simplify the filter) would be for SPARQL to borrow the COALESCE function from SQL. For those not familiar with COALESCE, it takes a variable number of arguments, and returns the first of those arguments which is not null. (In the SPARQL case, it would be the first which is bound.)That would make my filter as simple as: FILTER (inRange(COALESCE(?date1,?date2,?date3,?date4))) And my sorting as easy as: ORDER BY (COALESCE(?date1,?date2,?date3,?date4))
I should also mention that implementations are, of course, free to extend SPARQL with arbitrary functions, which could include COALESCE.
Lee
