cancel
Showing results for 
Search instead for 
Did you mean: 

Combine queries

mundi
Champ in-the-making
Champ in-the-making
Hi,

I wonder if there is any way to combine multiple queries.
To be more specific I have to do a search on several custom aspects.
An example for the queries to combine are the following:
select d.cmis:objectId from cmis:document as d join accident:reponse as a on d.cmis:objectId = a.cmis:objectId

and
select d.cmis:objectId from cmis:document as d join accident:foto as a on d.cmis:objectId = a.cmis:objectId

these two queries give me results. I've tried:
select d.cmis:objectId from cmis:document as d join accident:reponse as a on d.cmis:objectId = a.cmis:objectId join accident:foto as f on d.cmis:objectId = f.cmis:objectId;

but this won't give me any results.
Then I tried with the union
select d.cmis:objectId from cmis:document as d join accident:reponse as a on d.cmis:objectId = a.cmis:objectId union select d.cmis:objectId from cmis:document as d join accident:foto as a on d.cmis:objectId = a.cmis:objectId

but this returns me the error that the "Union" is unknown.
I'm using opencmis.

Has anyone an idea?
3 REPLIES 3

kaynezhang
World-Class Innovator
World-Class Innovator
keyword Union is not included in CMIS query specification

mundi
Champ in-the-making
Champ in-the-making
So is there any other way to combine queries?

kaynezhang
World-Class Innovator
World-Class Innovator
Using CMIS query ,as far as I know there is no way.