I need to query the jcr repository to find nodes where a date property (e.g. jcr:created) is younger than a specific date.
Using SQL2, I do the check "jcr:created > date" like that (which works fine):
SELECT * FROM [nt:base] AS s WHERE s.[jcr:created] > CAST('2012-01-05T00:00:00.000Z' AS DATE)
Now the tricky part:
There's an additional property which declares a number of days which have to be added to the jcr:created date dynamically.
Let's say the property contains 5 (days) then the query should not check "jcr:created > date" but rather "(jcr:created + 5) > date". The next node containing the property value 10 should be checked by "(jcr:created + 10) > date".
Is there any intelligent / dynamic operand which could do that? As the property is node specific I cannot add it statically to the query but it has to read it of each node.