Hi Team,
Could you please help me with the below requirement.
need a query to get no of items/docs available in a particular folder in CS10.5
using: Oracle11g
Thanks in advance
Regards
Rvindra
Would that particular folder have sub folders as well? I would suggest you to take a look at DTreeAncestors table.
Regards,
Riten
From: eLink Entry: Content Server LiveReports Forum [mailto:livereportsdiscussion@elinkkc.opentext.com]Sent: Friday, April 06, 2018 2:17 AMTo: eLink Recipient <devnull@elinkkc.opentext.com>Subject: Query to get no of items/docs available in a particular folder.
Query to get no of items/docs available in a particular folder.
Posted byravindra.reddy.pamuri@asml.com (Pamuri, Ravindra) On 04/06/2018 02:09 AM
[To post a comment, use the normal reply function]
Forum:
Content Server LiveReports Forum
Content Server:
My Support
Easy.
Use the DTREEANCESTORS table.
DTREEANCESTORS.ANCESTORID = <ParentfolderID>
DTREEANCESTORS.DATAID = DTREE.DATAID Check DTREE.SUBTYPE for the Type of Object
0 = Folder
144 = document
Use the attachment to define them as they're found. You can exclude Folders, if you want by looking for everything else ("Where dt.subtype <> 0 and dtan.ancestorid = <parentID>")
select dt.subtype, count(*)
from dtreeancestors dtan
join dtree dt on dtan.dataid = dt.dataid
where dtan.ancestorid = <parentID>
group by dt.subtype
order by dt.subtype
Colin J