This is a migrated thread and some comments may be shown as answers.

Help on OQL Select

1 Answer 36 Views
OQL (OQL specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Emanuel
Top achievements
Rank 1
Emanuel asked on 17 Jul 2014, 09:27 AM
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.

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 18 Jul 2014, 04:13 PM
Hi Emanuel,

looks like this is really OQL specific and not at all bound to OpenAccess. I fear, I cannot help here, and support for having is rarely requested.

Regards,
Thomas
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
OQL (OQL specific questions)
Asked by
Emanuel
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or