Reporting out current folder owner
I'm trying to provide a report with all folders in certain stages and want to show who currently is working on the folder (our folders move thru the process and may wait in a queue stage that multiple people can then "pick up" to action). Since the actions may take days, it's helpful to see which are being actioned by whom without having to open the folder.
I think I need to query the eevent table and get the eusername with the largest eeventid but something's not right. The query (for just one folder) is
select e.eusername, e.eeventid, e.efolderid
from eevent e,
(select efolderid, max(eeventid) as MaxID
from eevent
group by efolderid) CurrentDoer
where e.efolderid = '0900000000000000000000000000773'
and e.eeventid = CurrentDoer.MaxID
but instead of returning a single user, I still get multiple lines. Any help would be appreciated. Thanks!
Comments
-
I think you want the folowing SQL:
select e.eusername, e.eeventid, e.efolderid
from eevent e
WHERE e.efolderid = '0900000000000000000000000000773'
AND eEventId = (select max(eeventid) from eEvent WHERE efolderid = e.eFolderId )0 -
Or perhaps (if using SQL Server anyway)
SELECT TOP 1 eUserName
FROM eEvent
WHERE eFolder = '09............0773'
ORDER BY eEventID DESC
0 -
Thanks! That worked. We're running Oracle so the "Top 1" didn't.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 154 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories