How can I find documents that don't have a category? We use SQL Server. Documents are inside of folders that are 3 levels deep from the Enterprise workspace.
That’s a reverse of finding one that does, but more costly SQL running-wise.
You’d check if the DataID did not exist in LLATTRDATA.
Select dt.dataid, dt.name
From dtree dt
Where dt.dataid NOT EXISTS (select lla.id from llattrdata lla where lla.id = dt.dataid)
There’s other variations. I don’t think there are any DAUDITNEW activities that would reveal anything any quicker.
Colin J
From: eLink Entry: Content Server LiveReports Forum [mailto:livereportsdiscussion@elinkkc.opentext.com]Sent: Monday, June 25, 2018 11:47 AMTo: eLink Recipient <devnull@elinkkc.opentext.com>Subject: Documents with no category 2
Documents with no category 2
Posted bycwagner@mersofmich.com (Wagner, Chantal) On 06/25/2018 01:45 PM
[To post a comment, use the normal reply function]
Forum:
Content Server LiveReports Forum
Content Server:
My Support
Thanks for the reply. I tried that but it still didn't give me the results I was looking for. I saw another post that suggested a query, but it was for Oracle. How would I do this for SQL server?
--get a list of all documents from parent level through all sub-levelsselect distinct d.dataid, d.name, sys_connect_by_path(d.name,':') Pathfrom dtreecore dwhere d.subtype = 144start with d.parentid = 84308connect by prior d.dataid = d.parentid
minus
--subtract out all documents that have the categoryselect distinct d.dataid, d.name ContractName, sys_connect_by_path(d.name,':') Pathfrom dtreecore dleft outer join llattrdata a on d.dataid = a.id and d.versionnum = a.vernumwhere d.subtype = 144 and (a.defid = 84724 and (a.vernum = (select max(a2.vernum) from llattrdata a2 where a.id = a2.id) ) and (a.defvern = (select max(a3.defvern) from llattrdata a3 where a.id = a3.id) )start with d.parentid = 84308connect by prior d.dataid = d.parentidorder by path;
Select dataid from dtree where dataid not in (select id from llattrdata)
Cheers...