This question is locked. New answers and comments are not allowed.
Hi, i'm working on a system that uses an embedded OQL. I'm not able to write my query and i'm looking for help:
select e:externalDocumentId, e:description from Document e where e:externalDocumentId in (select o:externalDocumentId from Document o where e:externalDocumentId <> '' AND e:externalDocumentId <> 'DUMMY_ID' group by o:externalDocumentId having count(o:externalDocumentId) > 1) group by e:externalDocumentId,e:description order by e:externalDocumentId,e:description
this query prints:
123123 description1
454536 description2
768786 description3
786564 description4
912435 description5
786564 description6
454536 description7
I get tuples (id,description), note that in the result i have some tuples with the same id. I need to edit my query in order to get the tuples with the double ID (remove the touples which doesn't have a double)....
I hope it is clear.
select e:externalDocumentId, e:description from Document e where e:externalDocumentId in (select o:externalDocumentId from Document o where e:externalDocumentId <> '' AND e:externalDocumentId <> 'DUMMY_ID' group by o:externalDocumentId having count(o:externalDocumentId) > 1) group by e:externalDocumentId,e:description order by e:externalDocumentId,e:description
this query prints:
123123 description1
454536 description2
768786 description3
786564 description4
912435 description5
786564 description6
454536 description7
I get tuples (id,description), note that in the result i have some tuples with the same id. I need to edit my query in order to get the tuples with the double ID (remove the touples which doesn't have a double)....
I hope it is clear.