Hello, I am trying to come up with a JCR-SQL2 query that will return nodes that have a multi-value property containing a value in a range.
Example Data (data_value is LONG type) Node A - data_value: 1, 2, 4, 5 Node B - data_value: 1, 2, 3, 4, 5 SELECT * FROM [nt:base] WHERE data_value > 2; Returns Node A and B. SELECT * FROM [nt:base] WHERE data_value < 4; Returns Node A and B. SELECT * FROM [nt:base] WHERE data_value > 2 AND data_value < 4; Returns Node A and B, however, I want it to just return Node B since it is the only node that has a data_value between 2 and 4. Is there some way to do this in the JCR-SQL2? I have tried doing some inner joins with no luck. Is there a better way to structure the data so that it is semantically equivalent and easier to query? It might end up with tens of thousands of values or more. I was thinking of maybe having a child node for each value but not sure how that would scale. Any advice appreciated. -Mike
