Expand my Community achievements bar.

SOLVED

JCR Query expected static operand

Avatar

Level 1

I am trying to compare a value in my query with the returned values of a subquery.

 

The structure looks like the following:

 

SELECT * as node 

FROM [nt:unstructured]
WHERE node.[ATTR] in (SELECT otherNode.[ATTR] FROM … )

 

I get „expected: static operand“ error. Any suggestions on this?

PS: The query is a lot more complicated but the subquery returns the correct values. And also the main query returns the correct values (oc without the IN clausel) 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Arener09,

Sub queries are not supported by JCR, so the syntax you are trying to use will not work. Please have a look into official jackrabbit documentation, to get all the details about supported syntax/grammar that can be used to build proper query:

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @Arener09,

Sub queries are not supported by JCR, so the syntax you are trying to use will not work. Please have a look into official jackrabbit documentation, to get all the details about supported syntax/grammar that can be used to build proper query:

Avatar

Level 1

Thank you very much, you saved me so much time. I had to find a work around for this.