Hi all,
Wouldn't it me nice if we could do this;
folder(subquery)
In a DQL that is.
Cheers
Alain
what is the problem?
where any i_folder_id in (subquery)
I have a list of paths (that would be returned by a query) and I need to check if a doc is in those path... DESCEND!
So lets assume:
/cab1/fol1/...
/cab1/fol2/...
/cab1/fol3/...
I have to do a condition that validate that doc1 if effectively located somewhere under a list of path. Something like:
folder('/cab1/fol1','/cab1/fol2',DESCEND)
List of folder in the predicate in variable.
Can't do java code as it need to be implemented in D2 subscription Event Condition (DQL only)
So if I could do: folder(<sub query returning list of path>, DESCEND), that would be perfect :-)
Any ideas!? Maybe a registered view?!
DESCEND just adds one extra subquery level
No DESCEND:
SELECT r_object_id FROM dm_sysobjectWHERE ANY i_folder_id IN ( SELECT r_object_id FROM dm_folder WHERE ANY r_folder_path IN (...))
DESCEND:
SELECT r_object_id FROM dm_sysobjectWHERE ANY i_folder_id IN ( SELECT r_object_id FROM dm_folder WHERE ANY i_ancestor_id IN ( SELECT r_object_id FROM dm_folder WHERE ANY r_folder_path IN (...) ) )
Oh ya! The i_ancestor_id! I had forgot about this one. Nice
Thanks