DQL Question: Repeating Attributes

Options
Trupthy.Bharadwaj
edited August 12, 2011 in Documentum #1

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