JCR Query expected static operand | Community
Skip to main content
New Participant
Sep 27, 2022 10:19 PM UTC
Solved

JCR Query expected static operand

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) 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
lukasz-m
lukasz-mAccepted solution
New Participant
Sep 27, 2022 10:57 PM UTC

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:

2 replies

lukasz-m
lukasz-mAccepted solution
New Participant
Sep 27, 2022 10:57 PM UTC

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:

Translate
Arener09Author
New Participant
Sep 28, 2022 12:24 AM UTC

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

Translate