DQL Question: Repeating Attributes
I am trying to query our repository for the number of documents that have blank in an attribute value ( ssn). The issue is ssn is a repeating attribute.
Basically, I want all object ids of documents that have 0 elements in ssn attribute array or if the number of elements in ssn attribute array is > 0, then all the values should be blank or null.
The DQL I have come up with is not entirely accurate : it gives me documents that have no elements in ssn attribute array but it also gives me documents that have values like these:
ssn[0] = 111111111,
ssn[1] = blank or null
ssn[2] = blank or null
My DQL was something like this:
select count(distinct ssn), r_object_id from my_custom_type
where ssn is nullstring
group by r_object_id
having count(*)= 2
enable(ROW_BASED)
Any suggestions from the experts here? Any tips/suggestions or useful links will be much appreciated.
Answers
-
Hi.
Your query is:
select r_object_id
from my_custom_type
where not any ssn != ' '
And that's it
Etienne Jouvin
1 -
I tried and it works!
Wow - so simple .
Thanks so much Etienne!
0 -
Hi EJouvin,
This is realy helpfull while playing with repeating attributes.
Thanks Much !!
0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management