Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I am using Windchill 10.1 M040, and attempting to determine how many objects (parts, documents, epmdocs, whatever) are in each of my products.
I am thinking querybuilder can do this, but the count function gives me an error "A statement with aggregate function can not be used with access control."
Has anyone built such a query (and can share)?
Jeff, Below Query will give you all object types by count in every Product Context by folder name:
SELECT b.total_objects,b.CLASSNAMEKEYROLEBOBJECTREF, subfolder.name, pdmlinkproduct.namecontainerinfo
FROM subfolder,
pdmlinkproduct,
(SELECT Count(*) total_objects, ida3a5,CLASSNAMEKEYROLEBOBJECTREF
FROM iterfoldermemberlink
WHERE classnamekeyroleaobjectref = 'wt.folder.SubFolder'
GROUP BY ida3a5,iterfoldermemberlink.CLASSNAMEKEYROLEBOBJECTREF) b
WHERE subfolder.ida2a2=b.ida3a5 AND subfolder.ida3containerreference=pdmlinkproduct.ida2a2
ORDER BY namecontainerinfo;